home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacTech 1 to 12
/
MacTech-vol-1-12.toast
/
Reference
/
the cmsp digests ('94-'97)
/
csmp digest Vol 3 No 145
< prev
next >
Wrap
Text File
|
1996-04-25
|
125KB
|
3,263 lines
C.S.M.P. Digest Wed, 24 Apr 96 Volume 3 : Issue 145
Today's Topics:
Asynch SCSI Disk I-O???
Can't read more than 2 keys at once!
Converting a string to floating point
Files left open
Free to download stereo renderer (class project)
How to play a selection of a sound?
Macintosh Developer Central on WWW
Network source code-samples?
New Sprocket downloading info
OT TCP port reuse problem
OpenTransport Notifier routines
So how does DrawSprocket work?
TCL Page needs feedback.
What are little GURLs made of?
Windows vs Dialogs
[ANN] Macintosh C
mac INIT loading order
The Comp.Sys.Mac.Programmer Digest is moderated by Francois Pottier
(pottier@clipper.ens.fr).
The digest is a collection of article threads from the internet
newsgroups comp.sys.mac.programmer.help, csmp.tools, csmp.misc and
csmp.games. It is designed for people who read news semi-regularly and
want an archive of the discussions. If you don't know what a
newsgroup is, you probably don't have access to it. Ask your systems
administrator(s) for details. If you don't have access to news, you
may still be able to post messages to the group by using a mail server
like anon.penet.fi (mail help@anon.penet.fi for more information).
Each issue of the digest contains one or more sets of articles (called
threads), with each set corresponding to a 'discussion' of a particular
subject. The articles are not edited; all articles included in this digest
are in their original posted form (as received by our news server at
nef.ens.fr). Article threads are not added to the digest until the last
article added to the thread is at least two weeks old (this is to ensure that
the thread is dead before adding it to the digest). Article threads that
consist of only one message are generally not included in the digest.
The digest is officially distributed by two means, by email and ftp.
If you want to receive the digest by mail, send email to listserv@ens.fr
with no subject and one of the following commands as body:
help Sends you a summary of commands
subscribe csmp-digest Your Name Adds you to the mailing list
signoff csmp-digest Removes you from the list
Once you have subscribed, you will automatically receive each new
issue as it is created.
The official ftp info is ftp://ftp.dartmouth.edu/pub/csmp-digest.
Questions related to the ftp site should be directed to
scott.silver@dartmouth.edu.
-------------------------------------------------------
>From madole@mills.edu (David Madole)
Subject: Asynch SCSI Disk I-O???
Date: 2 Apr 1996 23:52:00 GMT
Organization: University of California, Berkeley
I think I remember reading somewhere recently (in my dreams??) about
asynch file I/O with PB<Blah-de-blah> having become a reality on certain
systems (using a certain SCSI chipset) under 7.5.x. Is this true, or
WAS I dreaming.
Doesn't seem to be true on a friend's 7500/100 under 7.5.2.
Can anybody do asynch disk reads on any system at present? Could
someone perhaps jog my memory regarding what I was reading?
Thanks a lot,
Dave Madole
+++++++++++++++++++++++++++
>From steve@mindvision.com (Steve Kiene)
Date: Wed, 03 Apr 1996 00:22:42 -0600
Organization: MindVision Software
In article <4jsej0$8ra@agate.berkeley.edu>, madole@mills.edu wrote:
> I think I remember reading somewhere recently (in my dreams??) about
> asynch file I/O with PB<Blah-de-blah> having become a reality on certain
> systems (using a certain SCSI chipset) under 7.5.x. Is this true, or
> WAS I dreaming.
>
> Doesn't seem to be true on a friend's 7500/100 under 7.5.2.
>
> Can anybody do asynch disk reads on any system at present? Could
> someone perhaps jog my memory regarding what I was reading?
Any machine running SCSI Manager 4.3 can do async i/o to the SCSI device.
This includes all PowerMacs, and I think all 040 machines. Floppies have
supported async i/o for a long time. However, the File System is still
single threaded.
I've been doing async stuff for years.
Steve Kiene
MindVision Software
+++++++++++++++++++++++++++
>From rbarris@quicksilver.com (Rob Barris)
Date: Thu, 04 Apr 1996 16:05:54 +0000
Organization: Quicksilver Software, Inc.
In article <4jsej0$8ra@agate.berkeley.edu>, madole@mills.edu wrote:
> I think I remember reading somewhere recently (in my dreams??) about
> asynch file I/O with PB<Blah-de-blah> having become a reality on certain
> systems (using a certain SCSI chipset) under 7.5.x. Is this true, or
> WAS I dreaming.
Retrospect does it just fine on my 8500, simultaneous disk and tape
activity, far better than it used to be able to do on a Q950. I haven't
written async PBRead stuff by hand yet, merely observed what other
programs are up to.
This may be affected by the type of HD driver you have installed. If it's
an Apple driver (or FWB, that's what I have) it should be possible. Show
us the code, give us some more results to look at! ;-)
Rob Barris
Quicksilver Software Inc.
rbarris@quicksilver.com
* Opinions expressed not necessarily those of my employer *
+++++++++++++++++++++++++++
>From jason@crocker.com (Jason Linhart)
Date: Thu, 04 Apr 1996 21:59:32 -0500
Organization: Crocker Communciations (crocker.com)
In article <4jsej0$8ra@agate.berkeley.edu>, madole@mills.edu wrote:
> I think I remember reading somewhere recently (in my dreams??) about
> asynch file I/O with PB<Blah-de-blah> having become a reality on certain
> systems (using a certain SCSI chipset) under 7.5.x. Is this true, or
> WAS I dreaming.
>
> Doesn't seem to be true on a friend's 7500/100 under 7.5.2.
The disk driver in 7.5.2 and 7.5.3 for SCSI disks does async disk IO. This
may or may not translate to async IO for your program depending on what
Macintosh model you have, what disk driver, which inits you have loaded,
and which file system calls you use.
I have confirmed async IO in some of my programs on a 7500/100 under 7.5.3
with no non-Apple inits. I know that it stops being async when I load my
full set of inits (many, many). I never bothered to trace that down.
--
- ------------------
JasonLion@minbar.com
Dr. Suess books . . . can be read and enjoyed on several levels. For
example, 'One Fish Two Fish, Red Fish Blue Fish' can be deconstructed
as a searing indictment of the narrow-minded binary counting system.
-- Peter van der Linden Expert C Programming, Deep C Secrets
+++++++++++++++++++++++++++
>From Symantec/Scott Morison <SYMScott@devtools.symantec.com>
Date: Wed, 03 Apr 1996 11:53:18 +0000
Organization: Symantec Corporation
David Madole wrote:
>
> I think I remember reading somewhere recently (in my dreams??) about
> asynch file I/O with PB<Blah-de-blah> having become a reality on certain
> systems (using a certain SCSI chipset) under 7.5.x. Is this true, or
> WAS I dreaming.
>
> Doesn't seem to be true on a friend's 7500/100 under 7.5.2.
>
> Can anybody do asynch disk reads on any system at present? Could
> someone perhaps jog my memory regarding what I was reading?
While is is true that the new SCSI manager supports async i/o and low-level file
manager calls can be used effectively to impliment async i/o, the File Manager
itself is still single threaded even in the async mode and therefore reentrant
async file transfer calls are really not allowed in 7.5.x.
>From what I have been able to tell, Copland is targeted for some multithreadable
asynchronous i/o File Manager behaviour and Gershwin should be even more complete
(and, oh yes, the Mac *WILL* still be alive and well at its reception... :)
There are a ton of cool work arounds and tricks on this (and every other
concievable programming issue under the sun ... uh, opps! *under the Mac*) in
c.s.m.p archives:
http://www.ambrosiasw.com/alt.sources.mac/archives.html
- Scott Morison, Syamntec Development Tools Technical Support naked beekeeper
- ----
For further information on this or any other C/C++/Pascal/Java issue, please feel
free to write to Symantec's Development Tools tech support zen masters:
support@devtools.symantec.com,
or give us a ring at : 541/465-8470
---------------------------
>From ttak@ellis.uchicago.edu (Spectreman Takeuchi)
Subject: Can't read more than 2 keys at once!
Date: Tue, 19 Mar 1996 22:58:23 GMT
Organization: University of Chicago -- Academic Computing Services
I'm writing a game, and I can't read more than two keys off the
keyboard at once (using GetKeys). This is a problem, a big problem,
for me because I want to make my game for 2 players. that would mean
sometimes up to six keys held down simultaneously. I've also tried
using GetNextEvent, but autokey doesn't work too hot with games.
Thanskk for the help!
--
Kenji Takeuchi ______/---------_______ 4-LINE SIGNATURE FILE
____------- / -----_
__-- /enji /akeuchi------ KENJI'S TOLL-FREE HOTLINE:
-____________---/---------/-----_____ etakeuc@vertex.ucls.uchicago.edu
+++++++++++++++++++++++++++
>From David T Mcwherter <dtm+@andrew.cmu.edu>
Date: Tue, 19 Mar 1996 22:45:40 -0500
Organization: Freshman, MCS Undeclared, Carnegie Mellon, Pittsburgh, PA
>>
I'm writing a game, and I can't read more than two keys off the
keyboard at once (using GetKeys). This is a problem, a big problem,
for me because I want to make my game for 2 players. that would mean
sometimes up to six keys held down simultaneously. I've also tried
using GetNextEvent, but autokey doesn't work too hot with games.
<<
As far as I know, the Mac can only detect two "real" keys down at a
time. It can detect modifier keys, such as shift, option, control, and
command in addition to those two keys at a time. So, if you want to
have two players, have one use the mouse, or have one use modifier keys
to control their movements.
There may be a workaround to this, but I don't know of it.
-David McWherter
dtm+@andrew.cmu.edu
http://abduction.res.cmu.edu
I want to die peacefully, in my sleep, like my grandfather, not
screaming, terrified, like his passengers.
+++++++++++++++++++++++++++
>From Caligula@cris.com (Stephen W. Evans)
Date: Wed, 20 Mar 1996 15:07:57 -0600
Organization: Me:Myself:And I
In article <4lHrxYq00iWQ8GY_gL@andrew.cmu.edu>, David T Mcwherter
<dtm+@andrew.cmu.edu> wrote:
>>>
>I'm writing a game, and I can't read more than two keys off the
>keyboard at once (using GetKeys). This is a problem, a big problem,
>for me because I want to make my game for 2 players. that would mean
>sometimes up to six keys held down simultaneously. I've also tried
>using GetNextEvent, but autokey doesn't work too hot with games.
>As far as I know, the Mac can only detect two "real" keys down at a
>time. It can detect modifier keys, such as shift, option, control, and
>command in addition to those two keys at a time. So, if you want to
>have two players, have one use the mouse, or have one use modifier keys
>to control their movements.
Keep a key state table. Set your eventMask to get both keydown and
keyup events. Read the state table instead of the keyboard and change
the state table in response to events. This can make your app aware
of any number of actual keys held down. Note that for "bare" modifier
keys you will still need to read the keyboard state itself.
- - Steve
Stephen W. Evans clgl - Caligula - WarBirds
ICI Host/Mac Programmer 4548 - Caligula - Air Warrior
caligula@cris.com Friends don't let friends do DOS.
PGP public key available by finger evans@rex.pfc.mit.edu
+++++++++++++++++++++++++++
>From ray@cinenet.net (RayMV)
Date: Wed, 20 Mar 1996 21:20:52 -0800
Organization: Cinenet Communications,Internet Access,Los Angeles;310-301-4500
> I'm writing a game, and I can't read more than two keys off the
> keyboard at once (using GetKeys). This is a problem, a big problem,
> for me because I want to make my game for 2 players. that would mean
> sometimes up to six keys held down simultaneously. I've also tried
> using GetNextEvent, but autokey doesn't work too hot with games.
>
> Thanskk for the help!
Try something like this: (taken pretty much from Think Reference)
/**************************************************************/
#define kLeftArrow 0x7B
#define kRightArrow 0x7C
#define kDownArrow 0x7D
#define kUpArrow 0x7E
unsigned char gKeyMap[16];
/**************************************************************/
short
KeyIsPressed(unsigned short k )
{
// k = any keyboard scan code, 0-127
return (( gKeyMap[k>>3] >> (k & 7)) & 1);
}
/**************************************************************/
main()
{
GetKeys( (unsigned long *) gKeyMap);
if(KeyIsPressed(kLeftArrow))
left_pressed();
if(KeyIsPressed(kRightArrow))
right_pressed();
if(KeyIsPressed(kUpArrow))
up_pressed();
if(KeyIsPressed(kDownArrow))
down_pressed();
}
+++++++++++++++++++++++++++
>From blob@ccnet.com
Date: Wed, 20 Mar 1996 21:22:29 -0800
Organization: CCnet Communications (510-988-7140 guest)
In article <DoJEA1.MrL@midway.uchicago.edu>, ttak@midway.uchicago.edu wrote:
> I'm writing a game, and I can't read more than two keys off the
> keyboard at once (using GetKeys). This is a problem, a big problem,
> for me because I want to make my game for 2 players. that would mean
> sometimes up to six keys held down simultaneously. I've also tried
> using GetNextEvent, but autokey doesn't work too hot with games.
I believe the adb driver doesn't post status on more than 2 keys at once.
Pete Gontier wrote a program called ADB KeySpy which was one of the most
recent developer CDs; perhaps that will help.
+++++++++++++++++++++++++++
>From Ivan Vecerina <ivan.vecerina@etumed.unil.ch>
Date: 21 Mar 1996 12:23:26 GMT
Organization: University of Lausanne CH (Switzerland)
Note that apple has published a snippet which does the right thing and
implements a non-alzheimer GetKeys() ...
Sorry I can't remember the exact source ... must have been on a DevCD ...
probably in a Game toolkit ...
+++++++++++++++++++++++++++
>From phaedrus@halcyon.com (Mark Phaedrus)
Date: Thu, 21 Mar 1996 16:30:46 -0700
Organization: Lycanthropes Anonymous
In article <4lHrxYq00iWQ8GY_gL@andrew.cmu.edu>, David T Mcwherter
<dtm+@andrew.cmu.edu> wrote:
>>>
>I'm writing a game, and I can't read more than two keys off the
>keyboard at once (using GetKeys). This is a problem, a big problem,
>for me because I want to make my game for 2 players. that would mean
>sometimes up to six keys held down simultaneously. I've also tried
>using GetNextEvent, but autokey doesn't work too hot with games.
><<
>
>
>As far as I know, the Mac can only detect two "real" keys down at a
>time. It can detect modifier keys, such as shift, option, control, and
>command in addition to those two keys at a time. So, if you want to
>have two players, have one use the mouse, or have one use modifier keys
>to control their movements.
>
>There may be a workaround to this, but I don't know of it.
Here we go again...
This is not a Macintosh hardware limitation, or a system software
limitation. This is a keyboard limitation. In theory, it would be
possible to create a keyboard with infinite rollover--one that could still
detect a key being pressed and released even if all the other keys were
already pressed. But it would be very expensive, so nobody does it.
"2-key rollover" (successfully read any two keys, plus the modifier keys)
is what Apple suggests, to allow for Command-Option-P-R and similar
keypresses. But some keyboards (particularly name-brand Apple keyboards)
can handle more than this, while others (particularly the throwaway
third-party keyboards) sometimes can't even handle two keys. Furthermore,
on any given keyboard, it's very unlikely that the rollover will really be
absolute this way (in other words, "any two keypresses are okay, but the
third keypress always gets lost"); in practice it's likely to depend on
the particular keys that are pressed. The simplest way to find out how
your keyboard works is to pull up the Key Caps DA, start pressing keys,
and see what gets displayed. On most Apple keyboards, you're likely to
find that you can successfully have at least seven keys pressed at once,
if you pick the right keys to press; you may also find combinations of as
few as three or four keys that won't register simultaneously.
Also, not all keyboards really allow all the modifier keys to be
pressed either. For example, I ran into one third-party keyboard that
could only produce Command-Option-P-R successfully if it was the _left_
Command and the _right_ Option key that were pressed... any other
combination, and it would drop the P or the R.
If the keyboard won't register a certain combination of keys, no
amount of clever keyboard-reading will work around this. If you want to
support lots of people banging around a Macintosh keyboard, the best way
to do that is to support multiple keyboards. Failing that, about the only
thing you can do is to make the keystrokes user-configurable, and
encourage the user to play around with Key Caps to find combinations that
work--or to get a better keyboard. :-)
--
\o\ If you're interested in books/stories with transformation themes,\o\
\o\please try <URL:http://www.halcyon.com/phaedrus/Menu.html>, or \o\
/o/anonymous-ftp to ftp.halcyon.com in /local/phaedrus/translist. /o/
/o/ Comments and submissions to this list are always welcome. /o/
+++++++++++++++++++++++++++
>From elliott@mpi-muelheim.mpg.de (Mark Elliott)
Date: Fri, 22 Mar 1996 16:10:54 +0100
Organization: Max-Planck-Institut f. Kohlenforsch. Muelheim
In article <Caligula-2003961507570001@199.3.119.175>, Caligula@cris.com
(Stephen W. Evans) wrote:
> In article <4lHrxYq00iWQ8GY_gL@andrew.cmu.edu>, David T Mcwherter
> <dtm+@andrew.cmu.edu> wrote:
>
> >>>
> >I'm writing a game, and I can't read more than two keys off the
> >keyboard at once (using GetKeys). This is a problem, a big problem,
> >for me because I want to make my game for 2 players. that would mean
> >sometimes up to six keys held down simultaneously. I've also tried
> >using GetNextEvent, but autokey doesn't work too hot with games.
>
> >As far as I know, the Mac can only detect two "real" keys down at a
> >time. It can detect modifier keys, such as shift, option, control, and
> >command in addition to those two keys at a time. So, if you want to
> >have two players, have one use the mouse, or have one use modifier keys
> >to control their movements.
>
> Keep a key state table. Set your eventMask to get both keydown and
> keyup events. Read the state table instead of the keyboard and change
> the state table in response to events. This can make your app aware
> of any number of actual keys held down. Note that for "bare" modifier
> keys you will still need to read the keyboard state itself.
This won't work. If you hold down 1 key, then press a second, then a 3rd,
when you press the 3rd key, the OS will report a KeyUp event for the first
key, even if it is held down.
(at least I have heard this so many times that I tend to believe it)
Best way to get around this limit is to use as many modifier keys as
possible - these are not subject to the 2 key limit.
(although I have been using GetKeys() to find more than 2 keys at a time.
I think it depends on the mac and keyboard. I don't need to bother about
this, so I don't!)
Mark
- ------------------------------------------------------------------
Mark C Elliott elliott@mpi-muelheim.mpg.de
Max-Planck-Institut voice: (+49) 208 306 2429
Fuer Kohlenforschung
Muelheim, Germany
- ------------------------------------------------------------------
+++++++++++++++++++++++++++
>From oo@oo.com (lisa beaufort)
Date: 24 Mar 1996 04:35:45 GMT
Organization: ooo
In article <blob-2003962122290001@h108-5-111.ccnet.com>, blob@ccnet.com wrote:
> In article <DoJEA1.MrL@midway.uchicago.edu>, ttak@midway.uchicago.edu wrote:
>
> > I'm writing a game, and I can't read more than two keys off the
> > keyboard at once (using GetKeys). This is a problem, a big problem,
> > for me because I want to make my game for 2 players. that would mean
> > sometimes up to six keys held down simultaneously. I've also tried
> > using GetNextEvent, but autokey doesn't work too hot with games.
>
I think I know how to do it in Assembly, If you want I can post the code.
c. lisa b.
+++++++++++++++++++++++++++
>From John Moreno <phenix@interpath.com>
Date: Sun, 24 Mar 1996 19:57:53 -0500
Organization: Interpath -- Providing Internet access to North Carolina
David T Mcwherter wrote:
>
> >>
> I'm writing a game, and I can't read more than two keys off the
> keyboard at once (using GetKeys). This is a problem, a big problem,
> for me because I want to make my game for 2 players. that would mean
> sometimes up to six keys held down simultaneously. I've also tried
> using GetNextEvent, but autokey doesn't work too hot with games.
> <<
>
> As far as I know, the Mac can only detect two "real" keys down at a
> time. It can detect modifier keys, such as shift, option, control, and
> command in addition to those two keys at a time. So, if you want to
> have two players, have one use the mouse, or have one use modifier keys
> to control their movements.
>
> There may be a workaround to this, but I don't know of it.
Well, I don't know what it is but there is obviously a way to do this.
I would recommend that he take MacsBug to KeyCaps DA, I just tested it,
and it will show up to 10 keys down with no problem - don't know about
more, I ran out of fingers.
John Moreno
+++++++++++++++++++++++++++
>From ttak@ellis.uchicago.edu (Spectreman Takeuchi)
Date: Sun, 24 Mar 1996 23:33:39 GMT
Organization: The University of Chicago
In article <oo-2403960035460001@ts2-d44.hfx.atcon.com>,
lisa beaufort <oo@oo.com> wrote:
>In article <blob-2003962122290001@h108-5-111.ccnet.com>, blob@ccnet.com wrote:
>
>> In article <DoJEA1.MrL@midway.uchicago.edu>, ttak@midway.uchicago.edu wrote:
>>
>> > I'm writing a game, and I can't read more than two keys off the
>> > keyboard at once (using GetKeys). This is a problem, a big problem,
>> > for me because I want to make my game for 2 players. that would mean
>> > sometimes up to six keys held down simultaneously. I've also tried
>> > using GetNextEvent, but autokey doesn't work too hot with games.
>>
>I think I know how to do it in Assembly, If you want I can post the code.
>c. lisa b.
--
Kenji Takeuchi ______/---------_______ 4-LINE SIGNATURE FILE
____------- / -----_
__-- /enji /akeuchi------ KENJI'S TOLL-FREE HOTLINE:
-____________---/---------/-----_____ etakeuc@vertex.ucls.uchicago.edu
+++++++++++++++++++++++++++
>From "Andrew C. Plotkin" <erkyrath+@CMU.EDU>
Date: Sun, 24 Mar 1996 23:53:04 -0500
Organization: Senior, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA
John Moreno <phenix@interpath.com> writes:
> > As far as I know, the Mac can only detect two "real" keys down at a
> > time. It can detect modifier keys, such as shift, option, control, and
> > command in addition to those two keys at a time. So, if you want to
> > have two players, have one use the mouse, or have one use modifier keys
> > to control their movements.
>
> Well, I don't know what it is but there is obviously a way to do this.
> I would recommend that he take MacsBug to KeyCaps DA, I just tested it,
> and it will show up to 10 keys down with no problem - don't know about
> more, I ran out of fingers.
Wrongo. I just tried it too. While it does appear to work at first, it
starts screwing up almost immediately. Raising one finger causes
several keys to un-light, and then it stops accepting new key-downs
until you raise all but two or three.
More experimentation -- it varies a lot with which keys it is. Keys in
the same vertical or horizontal row tend to interfere with each other,
which makes sense considering how keyboard circuitry tends to work.
For example, KeyCaps can't sense more than two of Q, E, C.
--Z
"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."
+++++++++++++++++++++++++++
>From y-tony@bu.edu (Yan Lee)
Date: 25 Mar 1996 15:59:51 GMT
Organization: Boston University
Spectreman Takeuchi (ttak@ellis.uchicago.edu) wrote:
: I'm writing a game, and I can't read more than two keys off the
: keyboard at once (using GetKeys). This is a problem, a big problem,
: for me because I want to make my game for 2 players. that would mean
: sometimes up to six keys held down simultaneously. I've also tried
: using GetNextEvent, but autokey doesn't work too hot with games.
: Thanskk for the help!
I think this is a limitation of ABS port. However, the maximum keys you
can read is actually 4. You can read 2 modifier keys (like shift,
control, or command) and 2 regular keys. You could probably mention this
to the user when there are two players. The game Asterax does this.
Later
Tony
+++++++++++++++++++++++++++
>From Testing (Testing)
Date: Mon, 25 Mar 1996 11:39:05 -0500
Organization: Testing
In article <3155EF91.6659@interpath.com>, John Moreno
<phenix@interpath.com> wrote:
> David T Mcwherter wrote:
> >
> > >>
> > I'm writing a game, and I can't read more than two keys off the
> > keyboard at once (using GetKeys). This is a problem, a big problem,
> > for me because I want to make my game for 2 players. that would mean
> > sometimes up to six keys held down simultaneously. I've also tried
> > using GetNextEvent, but autokey doesn't work too hot with games.
> > <<
> >
> > As far as I know, the Mac can only detect two "real" keys down at a
> > time. It can detect modifier keys, such as shift, option, control, and
> > command in addition to those two keys at a time. So, if you want to
> > have two players, have one use the mouse, or have one use modifier keys
> > to control their movements.
> >
> > There may be a workaround to this, but I don't know of it.
>
>
> Well, I don't know what it is but there is obviously a way to do this.
> I would recommend that he take MacsBug to KeyCaps DA, I just tested it,
> and it will show up to 10 keys down with no problem - don't know about
> more, I ran out of fingers.
I just tried the same thing and Key Caps only shows 2 keys at once. Any
presses after
the first two are completely ignored.
+++++++++++++++++++++++++++
>From John Moreno <phenix@interpath.com>
Date: Tue, 26 Mar 1996 01:05:11 -0500
Organization: Interpath -- Providing Internet access to North Carolina
Andrew C. Plotkin wrote:
>
> John Moreno <phenix@interpath.com> writes:
> > > As far as I know, the Mac can only detect two "real" keys down at a
> > > time. It can detect modifier keys, such as shift, option, control, and
> > > command in addition to those two keys at a time. So, if you want to
> > > have two players, have one use the mouse, or have one use modifier keys
> > > to control their movements.
> >
> > Well, I don't know what it is but there is obviously a way to do this.
> > I would recommend that he take MacsBug to KeyCaps DA, I just tested it,
> > and it will show up to 10 keys down with no problem - don't know about
> > more, I ran out of fingers.
>
> Wrongo. I just tried it too. While it does appear to work at first, it
> starts screwing up almost immediately. Raising one finger causes
> several keys to un-light, and then it stops accepting new key-downs
> until you raise all but two or three.
>
> More experimentation -- it varies a lot with which keys it is. Keys in
> the same vertical or horizontal row tend to interfere with each other,
> which makes sense considering how keyboard circuitry tends to work.
> For example, KeyCaps can't sense more than two of Q, E, C.
>
> --Z
>
> "And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."
I'm sorry but you seem to be mainly right, possibly absolutely. QEC is
a problem and so is PI, ... you get PI,/ the only problem that I
couldn't duplicate is the un-lighting of several keys then not accepting
new key-downs. BUT it still looks like it might be a good starting
point unless someone has all of the answers at their fingertips and is
willing to share.
John Moreno - who will admit when he's wrong on if he can't blame it on
someone else. He did it, not me.
+++++++++++++++++++++++++++
>From mxmora@mxmdesigns.com (Matthew Xavier Mora)
Date: 27 Mar 1996 07:27:40 GMT
Organization: MXM Designs™
In article <DoJEHC.35@midway.uchicago.edu>, ttak@midway.uchicago.edu wrote:
> I'm writing a game, and I can't read more than two keys off the
> keyboard at once (using GetKeys). This is a problem, a big problem,
> for me because I want to make my game for 2 players. that would mean
> sometimes up to six keys held down simultaneously. I've also tried
> using GetNextEvent, but autokey doesn't work too hot with games.
Its a hardware limitation in the design of the keyboards. It is possible
to detect more than two keys down if you go to the ADB driver level. The
problem is that you don't know which combinations of keys will actually
work. It depends on how the key matrix is wired. I was able to detect
about 5 non modifier keys on an extended keyboard when hooked into the adb
service routine. (you have to hunt around and find which keys are not
ganged together)
Pete Gontier has posted sample code on the developer CD that fixes GetKeys
failure of handling two keyboards. (the Adjustable keyboard is actually 3
adb devices and GetKeys is broken with that keyboard). From his sample
code you can see how to hook into the adb to get called when the keyboard
state changes.
Good Luck,
Xavier (who has hacked on the ADB for too long)
+++++++++++++++++++++++++++
>From skevill@tartarus.uwa.edu.au (Scott Kevill)
Date: Thu, 28 Mar 1996 22:53:34 +0800
Organization: The University of Western Australia
In article <4j6ftn$6js@news.bu.edu>, y-tony@bu.edu (Yan Lee) wrote:
: Spectreman Takeuchi (ttak@ellis.uchicago.edu) wrote:
: : I'm writing a game, and I can't read more than two keys off the
: : keyboard at once (using GetKeys). This is a problem, a big problem,
: : for me because I want to make my game for 2 players. that would mean
: : sometimes up to six keys held down simultaneously. I've also tried
: : using GetNextEvent, but autokey doesn't work too hot with games.
:
: : Thanskk for the help!
:
:
: I think this is a limitation of ABS port. However, the maximum keys you
: can read is actually 4. You can read 2 modifier keys (like shift,
: control, or command) and 2 regular keys. You could probably mention this
: to the user when there are two players. The game Asterax does this.
:
:
: Later
: Tony
The limitation is 2 normal keys and *ANY* number of modifier keys (caps,
shift, control, option, command). Possibly the Power-On key as well, but
that seems to work in weird ways. I think it might also be possible
override the default behaviour in order to differentiate between the two
shift keys, two control keys, etc on either side of the keyboard as well.
I forget where I read that last bit... Inside Mac V Event Manager?
Hope this helps,
Scott Kevill.
skevill@tartarus.uwa.edu.au
+++++++++++++++++++++++++++
>From pevensen@inlink.com (Peter T. Evensen)
Date: Thu, 11 Apr 1996 14:02:40 -0500
Organization: Siboney Learning Group
In article <4j9j47$l91@server05.icaen.uiowa.edu>, macpd@icaen.uiowa.edu
(Liquefy root user) wrote:
> John Moreno (phenix@interpath.com) wrote:
> : Andrew C. Plotkin wrote:
> : > John Moreno <phenix@interpath.com> writes:
> : > > > As far as I know, the Mac can only detect two "real" keys down at a
> : > > > time. It can detect modifier keys, such as shift, option,
control, and
> : > > > command in addition to those two keys at a time. So, if you want to
> : > > > have two players, have one use the mouse, or have one use
modifier keys
> : > > > to control their movements.
> : > >
> : > > Well, I don't know what it is but there is obviously a way to do this.
> : > > I would recommend that he take MacsBug to KeyCaps DA, I just tested it,
> : > > and it will show up to 10 keys down with no problem - don't know about
> : > > more, I ran out of fingers.
> : >
> : > Wrongo. I just tried it too. While it does appear to work at first, it
> : > starts screwing up almost immediately. Raising one finger causes
> : > several keys to un-light, and then it stops accepting new key-downs
> : > until you raise all but two or three.
> : >
> : I'm sorry but you seem to be mainly right, possibly absolutely. QEC is
> : a problem and so is PI, ... you get PI,/ the only problem that I
> : couldn't duplicate is the un-lighting of several keys then not accepting
> : new key-downs. BUT it still looks like it might be a good starting
> : point unless someone has all of the answers at their fingertips and is
> : willing to share.
>
> There is also the issue of which keyboards, the good Apple keyboard has 7 key
> rollover, the cheap one has 2 key rollover. A friend had to buy a new
> keyboard to be competitive in Marathon...
> Brett Davis
I discovered that the Mac Toolbox appears to stop sending autoKey events
if you hold down a key, press a second one, and then release the first
key. What I did to get around problem is if I didn't receive any keyDown
or autoKey events, I called GetKeys() and checked the bit corresponding to
the key code of the last key I got a keyDown event for.
Apple shipped ADB Key Spy 2 on their March 1996 Reference Library (part of
the technical mailings). It is billed as
"a replacement for the GetKeys routine by maiting a key map reflecting the
state of each keyboard attached to the Macintosh computer through the
Apple Desktop Bus. The package include soure dode. Inaddition to solving
the problem with the adjustable keybaord, this package is now a
demonstration of several techniques, including...using the ADB API,
'patching' ADB service routines..."
I haven't looked at it myself, but it looks like it might apply to this
problem. It is probably available on Apple's FTP site, if you dont' have
the Reference Library CD.
--
Peter T. Evensen
pevensen@inlink.com
---------------------------
>From dunham@pensee.com (David Dunham)
Subject: Converting a string to floating point
Date: Thu, 04 Apr 1996 18:47:40 -0800
Organization: Pensee Corporation
I attempted to solve this problem once before, without a whole lot of luck.
Is there a Toolbox routine that works on both PowerPC and 68K, which
converts an ASCII string to a floating point number? The last time I
looked at this, it was hard to find a routine that existed on both
platforms. I ended up parsing the string and converting the two halves of
the decimal point separately, which I'd like to avoid.
What I want is something like
double_t StringToDouble(Str255* aString);
David Dunham Pensee Corporation dunham@pensee.com
Voice/Fax: 206 783 7404 http://www.pensee.com/dunham/
"I say we should listen to the customers and give them what they want."
"What they want is better products for free." --Scott Adams
+++++++++++++++++++++++++++
>From mhteas@btech.com (Malcolm H. Teas)
Date: 5 Apr 1996 13:15:35 GMT
Organization: Blaze Technology, Inc.
In article <dunham-0404961847400001@feather.pensee.com>
dunham@pensee.com (David Dunham) writes:
> Is there a Toolbox routine that works on both PowerPC and 68K, which
> converts an ASCII string to a floating point number?
How about StringToExtended() in the TextUtilities manager? I'm
reasonably sure that this exists on both mac platforms. It's not quite
as convienent as StringToNum(), but it should do the job.
Malcolm H. Teas E-Mail: mhteas@btech.com
Blaze Technology, Inc. Telephone: 512/502-9552
PO Box 200279 Fax: 512/502-9554
Austin, TX USA 78720-0279 WWW: http://www.btech.com/
** A Macintosh software development services company **
+++++++++++++++++++++++++++
>From jwbaxter@olympus.net (John W. Baxter)
Date: Fri, 05 Apr 1996 16:07:07 -0800
Organization: Internet for the Olympic Peninsula
In article <dunham-0404961847400001@feather.pensee.com>, dunham@pensee.com
(David Dunham) wrote:
>I attempted to solve this problem once before, without a whole lot of luck.
>
>Is there a Toolbox routine that works on both PowerPC and 68K, which
>converts an ASCII string to a floating point number? The last time I
>looked at this, it was hard to find a routine that existed on both
>platforms. I ended up parsing the string and converting the two halves of
>the decimal point separately, which I'd like to avoid.
>
>What I want is something like
>
>double_t StringToDouble(Str255* aString);
The non-trivial but quite powerful routines needed are described in IM:
Text (right where one would expect them ;-)). Pages 5-35 to 5-42 for the
exhausing (er, exhaustive) description, and 5-94 to 5-99 for the routine
descriptions.
Unfortunately, what comes out of the routines is a SANE 80-bit Extended
value, which on PPC you need to convert to double_t (double) and on 68K
with FPU code generation you need to convert to double_t (the 96-bit long
double).
Probably best to write what you gave the prototype for above, and hide the
gory floating format conversions inside that.
Note that there's a format record to build before doing the conversion,
and either throw away or not afterwards (not is more efficient...throw
away simplifies dealing with users who switch script systems on you or
otherwise need the format record rebuilt). The same format record works
for conversions both directions.
In C++ one might write a class whose constructor takes in the format
string and creates the format record, and which has routines for doing the
conversions using that format record.
These routines will do more than you want, including handling input (with
a suitable format record) like
2 million 247 thousand 862.913
--John
--
The primary cause of problems is solutions.
John W. Baxter Port Ludlow, WA, USA jwbaxter@olympus.net
+++++++++++++++++++++++++++
>From dsample@synapse.net (Don Sample)
Date: Mon, 08 Apr 1996 01:27:06 -0400
Organization: DASoftware
In article <dunham-0404961847400001@feather.pensee.com>, dunham@pensee.com
(David Dunham) wrote:
>I attempted to solve this problem once before, without a whole lot of luck.
>
>Is there a Toolbox routine that works on both PowerPC and 68K, which
>converts an ASCII string to a floating point number? The last time I
>looked at this, it was hard to find a routine that existed on both
>platforms. I ended up parsing the string and converting the two halves of
>the decimal point separately, which I'd like to avoid.
>
>What I want is something like
>
>double_t StringToDouble(Str255* aString);
>
>David Dunham Pensee Corporation dunham@pensee.com
If you don't need to worry about non-english number formats there are the
ANSI C functions atof() or strtod().
--
Don Sample |
dsample@bix.com | Quando Omni Flunkus Moritati
dsample@synapse.net |
http://www.synapse.net/~dsample/ |
+++++++++++++++++++++++++++
>From ghd@ccnet.com (Gregory Dow)
Date: Thu, 11 Apr 1996 13:54:47 -0800
Organization: CCnet Communications (510-988-7140 guest)
In article <dunham-0404961847400001@feather.pensee.com>
dunham@pensee.com (David Dunham) writes:
> Is there a Toolbox routine that works on both PowerPC and 68K, which
> converts an ASCII string to a floating point number?
The PowerPlant LString class has routines for converting between
strings and floating point numbers. It uses the str2dec() and
dec2num() routines which are declared in Apple's Universal Headers
in the file <fp.h> and defined in Apple's MathLib library.
-- Greg Dow
-- metrowerks
---------------------------
>From Tom Messick <tommessick@earthlink.net>
Subject: Files left open
Date: 5 Apr 1996 04:43:39 GMT
Organization: Earthlink Network, Inc.
Is there any way to find open files on an HFS volume or a way to close all files
without knowing the reference numbers? I am working on a 2-CD game and the os
sometimes asks for the first CD after I eject it. I suspect that open files
have prevented the volume from dismounting.
--
Tom Messick - InterWeave Entertainment
tommessick@screaming.com
(818) 883-1920
883-9650 (fax)
+++++++++++++++++++++++++++
>From jumplong@aol.com (Jump Long)
Date: 7 Apr 1996 04:10:44 -0400
Organization: America Online, Inc. (1-800-827-6364)
Tom Messick wrote:
>Is there any way to find open files on an HFS volume or a way to
>close all files without knowing the reference numbers? I am
>working on a 2-CD game and the os sometimes asks for the first
>CD after I eject it. I suspect that open files have prevented
>the volume from dismounting.
Ejecting a disk doesn't unmount it - it just puts it offline. The next
time anything makes a File Manager call to that volume that might require
disk access, the File Manager is going to ask for the volume back.
The solution is close all files you have open on the volume and then
Unmount the volume. If others have files open on the volume (not counting
the catalog, extents overflow and Desktop Manager files - the OS takes
care of those), you can't unmount the volume and you'll get a fBsyErr
error.
If you're trying to eject the disk and then unmount the volume, you've got
the order of calls backwards. Get MoreFiles
<ftp://members.aol.com/JumpLong/MoreFiles_1.4.2.sea.hqx> and use the
UnmountAndEject routine. It does everything in the right order.
Oh yeah, drop into MacsBug and use the FILE dcmd to see what files are
open on your volumes.
- Jim Luther
+++++++++++++++++++++++++++
>From devon@apple.com (Devon Hubbard)
Date: Tue, 09 Apr 1996 01:30:26 -0700
Organization: Apple Computer, Inc.
In article <4k28dr$da3@uruguay.it.earthlink.net>, Tom Messick
<tommessick@earthlink.net> wrote:
> Is there any way to find open files on an HFS volume or a way to close
all files
> without knowing the reference numbers? I am working on a 2-CD game and the os
> sometimes asks for the first CD after I eject it. I suspect that open files
> have prevented the volume from dismounting.
I'm not sure if you're looking for a programmatic way or just a way to
check for open files during debugging/testing to find out what's going
with your CD. If you have Macsbug, enter the command 'files' and press
return. You will get a list of open files and the volumes they are opened
from. If you are using Jasik, take a look at the 'Task & File Info'
command to get at the same kind of list.
Hope that helps.
dEVoN
---------------------------
>From mbishop@ren.us.itd.umich.edu (Michael J Bishop)
Subject: Free to download stereo renderer (class project)
Date: 11 Apr 1996 00:39:52 GMT
Organization: University of Michigan
Hi,
I have created a 3D Stereo (red & blue) Renderer based on code from
"Engines of Creation" and put it on my web page.
I spent a lot of time matching the colors to minimize the "ghost effect"
so the stereo effect is really very good. Try it out and let me know what
you think!
Requires:
- PowerMac
- 256 color mode.
- user who doesn't mind looking silly wearing RB glasses :)
http://www-personal.umich.edu/~mbishop/3D.stereo.renderer.sit.hqx
--
-- Michael
mbishop@umich.edu mbishop.work@umich.edu
313.213.0484 http://www-personal.umich.edu/~mbishop
- -----------------------------------------------------------------------
"A 'program' which could produce brilliant music would have to wander
around the world on its own, fighting its way through the maze of life and
feeling every moment of it." -- Douglas Hofstader, "Godel, Escher, and Bach"
---------------------------
>From marcus.filipsson@ling.lu.se (Marcus Filipsson)
Subject: How to play a selection of a sound?
Date: Thu, 04 Apr 1996 10:20:13 +0200
Organization: Dept of Linguistics
I am trying to write a small sound program. I record sound to a resource
or file (both work fine) , and display it. The user then selects a portion
with the mouse, and he wants to listen only to this selection. I know what
byte to start and where to end, but how do I play only this portion, using
high or low-level routines?
Any help on this matter would be appreciated!
Marcus Filipsson
========================================================
Marcus Filipsson
Research Engineer
Email: marcus.filipsson@ling.lu.se
WWW: http://www.ling.lu.se/persons/Marcus/
Tel: +46-(0)46-2228449
Fax: +46-(0)46-2224210
Lund University, Dept. of Linguistics
Helgonabacken 12, S-223 62 Lund, SWEDEN
========================================================
+++++++++++++++++++++++++++
>From David Jackson Shields <digidave@vvstudios.com>
Date: Fri, 05 Apr 1996 01:33:34 -0800
Organization: Vanguard Vision Studios, San Francisco, CA
Marcus Filipsson wrote:
>
> I am trying to write a small sound program. I record sound to a resource
> or file (both work fine) , and display it. The user then selects a portion
> with the mouse, and he wants to listen only to this selection. I know what
> byte to start and where to end, but how do I play only this portion, using
> high or low-level routines?
High-level routines are not set up for playing portions of a file or
resource...they play the whole thing. So that leaves low-level routines.
If you are going to want to avoid hiccups if other streams occur
simultaneously, you may want to look at SndPlayDoubleBuffer(). You set
up two buffers to "prime the pump", and then while one buffer is being
played by the sound card, you fill the other buffer from your file data.
This gives you control over just what data will be played from within
the sound.
To deal with double buffering, you have to fill out header structures,
and deal with asynchronous completion routines...but it's a good excuse
to learn about this stuff.
There are code examples in the old Inside Mac Volume VI, Chapter 22 on
setting up and using double buffers.
Have fun...
--Dave
---------------------------
>From yan@darwin.bu.edu (Y. Tony Lee)
Subject: Macintosh Developer Central on WWW
Date: Sun, 07 Apr 1996 20:51:57 -0500
Organization: Boston University
Hello,
I put up a www page to help macintosh programmers. You can check it out
at:
http://med-amsa.bu.edu/Pharmacology/pharm.people/Lee/MacProg.html
Please tell me your opinions.
Thanks,
Tony
---------------------------
>From umsmith@mcs.drexel.edu (M. Scott Smith)
Subject: Network source code-samples?
Date: Thu, 04 Apr 1996 07:29:06 -0500
Organization: Drexel University
Hello!
I'm in search of some simple code that demonstrates how to
use MacTCP to interact with the network. Specifically, I'd like
to be able to send data to a machine (i.e., telnet) and receive
it.
I came across the source code for NCSA Telnet, and it does
exactly what I want, but it does quite a bit more. So the source
code is a little overwhelming, and I'd rather start with something
simple. Can anyone point me in the direction of sample code that
serves as a "simple telnet"?
The project I'm working on won't need to present a user with
an interactive telnet session. Rather, the program will make requests
via telnet to receive html pages. So this seems like it should be
fairly simple, I've just never dealt with MacTCP before and am
having trouble finding a good place to start learning.
Thanks in advance for any pointers!
- Scott
- ----------------------------------------------------------------------------
M. Scott Smith Computer Science Major, Math Minor; Drexel University
Macintosh / Sun Developer; President, MCS Society
http://www.mcs.drexel.edu/~umsmith
umsmith@mcs.drexel.edu home #: (215) 243-0735
+++++++++++++++++++++++++++
>From zobkiw@triplesoft.com (Joe Zobkiw)
Date: Thu, 04 Apr 1996 18:38:20 -0500
Organization: TripleSoft Inc.
In article <umsmith-0404960729060001@philly32.voicenet.com>,
umsmith@mcs.drexel.edu (M. Scott Smith) wrote:
> I'm in search of some simple code that demonstrates how to
>use MacTCP to interact with the network. Specifically, I'd like
>to be able to send data to a machine (i.e., telnet) and receive
>it.
>
> I came across the source code for NCSA Telnet, and it does
>exactly what I want, but it does quite a bit more. So the source
>code is a little overwhelming, and I'd rather start with something
>simple. Can anyone point me in the direction of sample code that
>serves as a "simple telnet"?
>
> The project I'm working on won't need to present a user with
>an interactive telnet session. Rather, the program will make requests
>via telnet to receive html pages. So this seems like it should be
>fairly simple, I've just never dealt with MacTCP before and am
>having trouble finding a good place to start learning.
Grand Unified Socket Interface does this:
<ftp://ftp.metrowerks.com//pub/updates/CW8/CWGUSI.sit.hqx>
Also the PowerPlant Networking classes do as well. These can begotten from
the latest CodeWarrior CD. These classes also come with a Telnet sample
application. It is very basic but may show you some techniques that you
can use to build your own.
Joe Zobkiw <mailto:zobkiw@triplesoft.com>
TripleSoft Inc. <http://www.triplesoft.com/>
PO Box 30774 Raleigh, NC 27622 (919) 872-0916 voice/fax
- -------------------------------------------------------------
Specializing in Macintosh Software Development & WWW Publishing
- -------------------------------------------------------------
Macintosh Programmers --> <http://www.triplesoft.com/fragment/>
+++++++++++++++++++++++++++
>From mtrent@msn.fullfeed.com (Michael Trent)
Date: 9 Apr 1996 04:25:55 GMT
Organization: FullFeed Madison (newsmaster@msn.fullfeed.com)
> > I'm in search of some simple code that demonstrates how to
> >use MacTCP to interact with the network. Specifically, I'd like
> >to be able to send data to a machine (i.e., telnet) and receive
> >it.
>
> Grand Unified Socket Interface does this:
Simple Sockets also does this. It isn't nearly as powerful as GUSI, but it
isn't nearly as complicated either. Simple Sockets was written to be just
that: a simple, understandable socket library. It can be found at:
<ftp://mirrors.aol.com/pub/info-mac/dev/lib/simple-sockets-11.hqx>
or on the Apprentice Source Code CDROM (vols 3 and 4), and elsehwere.
Personally, I find the source code for Newswatcher to be tremendously
helpful, though some amount of digging through John's code might be
required. (I don't say that to discourage, one can learn a lot from
digging through John's code!)
<ftp://ftp.acns.nwu.edu/pub/newswatcher/>
--
M.S. : A crippling disease, for which there is no cure.
MS(tm): A crippling disease, for which there is no cure.
---------------------------
>From jasonp@red.seas.upenn.edu (Jason S Pareti)
Subject: New Sprocket downloading info
Date: 4 Apr 1996 08:10:41 GMT
Organization: University of Pennsylvania
I'm posting a message which Michelle Wyner posted on the Semper Fi
mailing list today, discussing the corrupted Game Sprockets. (hope you
don't mind Michelle!)
- ---
There are now 3 ways to get the sprockets stuff.
The PDF file has been fixed, the Sprockets SDK itself is going to be
broken up into components, making for smaller downloads (I'm doing that
as I type this too), and the Web pages will be updated to reflect that.
If you don't want to wait for the SDK to be broken up, here's where you
can go..
<ftp://ftpdev.info.apple.com/Developer_Services/Games> - I'm told this
has been fixed, and it looks ok now.
<ftp://ftp.info.apple.com/Apple.Support.Area/Developer_Services/Games>
or from the Web, you can even do
<http://cgi.info.apple.com/cgi-bin/lister-pl?Apple.Support.Area/Developer_S
ervices/Games>
note however that on this, the correct version of the docs may not have
been mirrored out yet (if the site that comes up is ftp.info, then it
has).
Any other questions/problems, please take up with me.
--Michelle Wyner
Apple Developer Press
Developer Services Jedi Webmaster
"Use the Web, Luke!"
- ---
Cheers,
Jason
+-----------------------------------------------------------------+
| Jason Pareti 3910 Irving St., Box 344 |
| Student, Mac Programmer High Rise South, Box 344 |
| Apple Computer Student Rep. Philadelphia, PA 19104 |
+-----------------------------------------------------------------+
| Net: jasonp@eniac.seas.upenn.edu Voice: (215) 417-8005 |
| AOL: AbbotSW Fax: (215) 417-8005 |
| WWW: homepage.seas.upenn.edu/~jasonp/ |
+-----------------------------------------------------------------+
+++++++++++++++++++++++++++
>From jasonp@red.seas.upenn.edu (Jason S Pareti)
Date: 4 Apr 1996 22:30:07 GMT
Organization: University of Pennsylvania
There is now an official e-mail address for the game sprockets:
sprockets@adr.apple.com
I assume that any questions, comments, or techinal problems should be
addressed there.
Cheers,
Jason
+++++++++++++++++++++++++++
>From karm@bga.com (Kevin Armstrong)
Date: Thu, 04 Apr 1996 13:59:23 -0600
Organization: Lion Entertainment, Inc.
In article <4k0061$hoo@netnews.upenn.edu>, jasonp@red.seas.upenn.edu
(Jason S Pareti) wrote:
>I'm posting a message which Michelle Wyner posted on the Semper Fi
>mailing list today, discussing the corrupted Game Sprockets. (hope you
>don't mind Michelle!)
>
>-----
>
>There are now 3 ways to get the sprockets stuff.
>
>The PDF file has been fixed, the Sprockets SDK itself is going to be
>broken up into components, making for smaller downloads (I'm doing that
>as I type this too), and the Web pages will be updated to reflect that.
>
>If you don't want to wait for the SDK to be broken up, here's where you
>can go..
>
><ftp://ftpdev.info.apple.com/Developer_Services/Games> - I'm told this
>has been fixed, and it looks ok now.
>
><ftp://ftp.info.apple.com/Apple.Support.Area/Developer_Services/Games>
>
>or from the Web, you can even do
>
><http://cgi.info.apple.com/cgi-bin/lister-pl?Apple.Support.Area/Developer_S
>ervices/Games>
>note however that on this, the correct version of the docs may not have
>been mirrored out yet (if the site that comes up is ftp.info, then it
>has).
>
>Any other questions/problems, please take up with me.
>
>--Michelle Wyner
> Apple Developer Press
> Developer Services Jedi Webmaster
> "Use the Web, Luke!"
>
>
>-----
>
>Cheers,
>Jason
The pdf in the docs file is indeed fixed, but the DrawSprocketLib is still
not a valid PEF file. The other Sprocket Libraries are. So again, we
wait to try this stuff out. At least we can read about what it is suppose
to do now.
Kevin Armstrong
Lion Entertainment, Inc.
+++++++++++++++++++++++++++
>From karm@bga.com (Kevin Armstrong)
Date: Thu, 04 Apr 1996 23:10:53 -0600
Organization: Lion Entertainment, Inc.
Well, I downloaded a working version of the draw sprocket lib and now I
get to play. =)
Oh, I got it from the ftpdev.info.apple.com site. Sorry, no full URL at
this time. Besides, if you've been trying to get it, you know where it is
at. =)
Well, time to install QuickDraw3D.
Kevin Armstrong
Lion Entertainment, Inc.
+++++++++++++++++++++++++++
>From bwanga@cats.ucsc.edu (Timothy A. Seufert)
Date: Sat, 06 Apr 1996 18:28:34 -0800
Organization: Evil Geniuses For A Better Tomorrow
In article <karm-0404961359230001@news3.realtime.net>, karm@bga.com (Kevin
Armstrong) wrote:
>The pdf in the docs file is indeed fixed, but the DrawSprocketLib is still
>not a valid PEF file. The other Sprocket Libraries are. So again, we
>wait to try this stuff out. At least we can read about what it is suppose
>to do now.
Download the standalone DrawSprocket archive - it has a good copy of
DrawSprocketLib. After copying that over the corrupt version, I had no
problem running any of the Sprocket test programs.
+-----------------------------------------------------------+
|Tim Seufert, bwanga@cats.ucsc.edu | UselessWastedSpace(tm) |
| "I never give them hell. I just tell the truth, and they |
| think it is hell." -Harry S Truman |
+-----------------------------------------------------------+
---------------------------
>From checker@netcom.com (Chris Hecker)
Subject: OT TCP port reuse problem
Date: Sun, 7 Apr 1996 23:29:37 GMT
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
I'm trying to learn OpenTransport TCP programming, but I'm running into
a problem with one of the samples. If I run the TCP Catch sample it
will recieve a packet from my other machine (a non-mac), but if I try
to run it again on the same port it won't work. The way in which is
fails is weird, though. The AsyncOpenEndpoint, the Bind, and the
Listen all return successfully, but the listen returns instantly,
before the other machine has tried to attach. Needless to say, I never
get any data on this socket. It fails with a -3155 on the Accept after
the listen. If I call GetEndpointState it returns T_UNBND, and if I
call Bind again it returns -3154, which is kOTNoAddressErr. I'm
passing the same stuff to Bind that I did when it worked, so I don't
understand what the problem is. It seems like the previous run is
leaving the port open or something, but I don't know how to prevent it
from doing this (I thought OT was supposed to clean this stuff up).
These samples aren't the greatest.
Would the OT debug binaries help out here? I'd assume so, but I don't
know where to get them. I downloaded the SDK from apple's ftp site
(seeding, I think).
Chris
+++++++++++++++++++++++++++
>From checker@netcom.com (Chris Hecker)
Date: Tue, 9 Apr 1996 05:44:58 GMT
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
>a problem with one of the samples. If I run the TCP Catch sample it
>will recieve a packet from my other machine (a non-mac), but if I try
>to run it again on the same port it won't work.
>understand what the problem is. It seems like the previous run is
>leaving the port open or something, but I don't know how to prevent it
>from doing this (I thought OT was supposed to clean this stuff up).
>These samples aren't the greatest.
I'm commenting on my own message, but just in case anyone cares, the
problem is that I (really the TCP Catch sample) send an
SndOrderlyDisconnect, but the other app wasn't replying with an orderly
disconnect, it was just hanging up. The sample then sent an
RcvOrderlyDisconnect, which failed, and it shut down the endpoint. I
put a SndDisconnect in there to clear the endpoint state from OUTREL to
IDLE, and then I can use the port next time. I'd think OpenTransport
should do this when my app closes the provider, but what do I know?
Chris
+++++++++++++++++++++++++++
>From zobkiw@triplesoft.com (Joe Zobkiw)
Date: Tue, 09 Apr 1996 21:52:25 -0400
Organization: TripleSoft Inc.
In article <checkerDpIMLD.263@netcom.com>, checker@netcom.com (Chris
Hecker) wrote:
>I'm trying to learn OpenTransport TCP programming, but I'm running into
>a problem with one of the samples. If I run the TCP Catch sample it
>will recieve a packet from my other machine (a non-mac), but if I try
>to run it again on the same port it won't work. The way in which is
>fails is weird, though. The AsyncOpenEndpoint, the Bind, and the
>Listen all return successfully, but the listen returns instantly,
>before the other machine has tried to attach. Needless to say, I never
>get any data on this socket. It fails with a -3155 on the Accept after
>the listen. If I call GetEndpointState it returns T_UNBND, and if I
>call Bind again it returns -3154, which is kOTNoAddressErr. I'm
>passing the same stuff to Bind that I did when it worked, so I don't
>understand what the problem is. It seems like the previous run is
>leaving the port open or something, but I don't know how to prevent it
>from doing this (I thought OT was supposed to clean this stuff up).
>These samples aren't the greatest.
>
>Would the OT debug binaries help out here? I'd assume so, but I don't
>know where to get them. I downloaded the SDK from apple's ftp site
>(seeding, I think).
I think this is going to become the most asked OT question... :)
This has to do with OT "reserving" the port after a connection for a
period of two minutes. The thinking is that after a connection is made on
the port, then disconnects, if another application used the same port it
might possibly still receive data from the remote end who still might be
communicating with the port. Two minutes is long enough to ensure that
most (all) packets would have timed out by then. You can use the
OptionManagement function to change this "feature" of OT.
Hope this helps.
Joe Zobkiw TripleSoft Inc.
<mailto:zobkiw@triplesoft.com> PO Box 30774 Raleigh NC 27622
<http://www.triplesoft.com/> (919) 872-0916 voice/fax
- - Macintosh Software Development and Internet Publishing ---
Macintosh Programmers -> <http://www.triplesoft.com/fragment/>
---------------------------
>From David T Mcwherter <dtm+@andrew.cmu.edu>
Subject: OpenTransport Notifier routines
Date: Sat, 6 Apr 1996 08:40:02 -0500
Organization: Freshman, Mathematics, Carnegie Mellon, Pittsburgh, PA
I just started programming with Opentransport, and just noticed that all
of the notifier routines that you can designate are ProcPtrs, not UPP's.
I cannot even find UPP's defined in the .h files like they usually are.
I noted that the docs say that OT assumes the procptr is compiled for
the same architecture as the architecture that called the OT routine
which gives OT the notifier procptr. So, is it safe to use normal
ProcPtr's to do Notifier routines?
-David McWherter
dtm+@andrew.cmu.edu
http://abduction.res.cmu.edu
I want to die peacefully, in my sleep, like my grandfather, not
screaming, terrified, like his passengers.
+++++++++++++++++++++++++++
>From scouten@metrowerks.com (Eric Scouten)
Date: Sat, 06 Apr 1996 11:17:10 -0600
Organization: Metrowerks, Inc.
In article <MlNbEm_00iWXA1ELQQ@andrew.cmu.edu>, David T Mcwherter
<dtm+@andrew.cmu.edu> wrote:
> I just started programming with Opentransport, and just noticed that all
> of the notifier routines that you can designate are ProcPtrs, not UPP's.
> I cannot even find UPP's defined in the .h files like they usually are.
> I noted that the docs say that OT assumes the procptr is compiled for
> the same architecture as the architecture that called the OT routine
> which gives OT the notifier procptr. So, is it safe to use normal
> ProcPtr's to do Notifier routines?
This is basically correct.
BTW, Apple has since decided that programmers should avoid using the
native OT interfaces on 68K builds. Not an absolute requirement, but OT is
less well tested on 68K.
-es
__________________________________________________________________________
Eric Scouten Constructor Constructor
scouten@metrowerks.com Metrowerks, Inc.
Buying my car was easy, but this... this is SHOES.
-Saturn advertisement
+++++++++++++++++++++++++++
>From jason@crocker.com (Jason Linhart)
Date: Sun, 07 Apr 1996 01:27:19 -0500
Organization: Crocker Communciations (crocker.com)
In article <MlNbEm_00iWXA1ELQQ@andrew.cmu.edu>, David T Mcwherter
<dtm+@andrew.cmu.edu> wrote:
> I just started programming with Opentransport, and just noticed that all
> of the notifier routines that you can designate are ProcPtrs, not UPP's.
> I cannot even find UPP's defined in the .h files like they usually are.
> I noted that the docs say that OT assumes the procptr is compiled for
> the same architecture as the architecture that called the OT routine
> which gives OT the notifier procptr. So, is it safe to use normal
> ProcPtr's to do Notifier routines?
Normal ProcPtrs work just fine. The rule is that all OT code must be for
the same processor
that you are actualy running on. You can't emulate 68K code that calls OT
on a PPC. Thus
no universal proc pointers.
--
- ------------------
JasonLion@minbar.com
Dr. Suess books . . . can be read and enjoyed on several levels. For
example, 'One Fish Two Fish, Red Fish Blue Fish' can be deconstructed
as a searing indictment of the narrow-minded binary counting system.
-- Peter van der Linden Expert C Programming, Deep C Secrets
+++++++++++++++++++++++++++
>From quinn@quinn.echidna.id.au (Quinn "The Eskimo!")
Date: Tue, 09 Apr 1996 10:14:04 -0800
Organization: Late Night Silly Software
In article <MlNbEm_00iWXA1ELQQ@andrew.cmu.edu>, David T Mcwherter
<dtm+@andrew.cmu.edu> wrote:
>I just started programming with Opentransport, and just noticed that all
>of the notifier routines that you can designate are ProcPtrs, not UPP's.
> I cannot even find UPP's defined in the .h files like they usually are.
> I noted that the docs say that OT assumes the procptr is compiled for
>the same architecture as the architecture that called the OT routine
>which gives OT the notifier procptr. So, is it safe to use normal
>ProcPtr's to do Notifier routines?
No. The only safe use of notifiers is to point them at code that's
compiled in the native architecture of the endpoint. [The native
architecture of the endpoint is the ISA of the client that called
OpenEndpoint.] OT does not CallUniversalProc when calling your notifier,
it just jumps to it.
If your endpoint needs access to non-native code, you will have install a
native endpoint that does the MixedModeMagic.
Share and Enjoy.
--
Quinn "The Eskimo!" <http://www.quinn.echidna.id.au/Quinn/WWW/>
"Too late, your imperfection has exceeded acceptable
error levels. You are terminated!"
+++++++++++++++++++++++++++
>From phamilton@macromedia.com (Paul Hamilton)
Date: Tue, 09 Apr 1996 13:12:46 -0800
Organization: Macromedia
In article <quinn-0904961014040001@17.128.202.29>,
quinn@quinn.echidna.id.au (Quinn "The Eskimo!") wrote:
> In article <MlNbEm_00iWXA1ELQQ@andrew.cmu.edu>, David T Mcwherter
> <dtm+@andrew.cmu.edu> wrote:
>
> No. The only safe use of notifiers is to point them at code that's
> compiled in the native architecture of the endpoint. [The native
> architecture of the endpoint is the ISA of the client that called
> OpenEndpoint.] OT does not CallUniversalProc when calling your notifier,
> it just jumps to it.
>
> If your endpoint needs access to non-native code, you will have install a
> native endpoint that does the MixedModeMagic.
>
Yeah,
But you could just setup a RoutineDescriptor with your code (whatever
architecture) and pass that. If OT just does a jump to the code, then it
will jump to MixedModeMagic inside the upp and everything will be fine.
Right?
Paul.
--
Paul Hamilton
Authorware Senior Software Engineer
Macromedia
+++++++++++++++++++++++++++
>From David T Mcwherter <dtm+@andrew.cmu.edu>
Date: Tue, 9 Apr 1996 18:46:10 -0400
Organization: Freshman, Mathematics, Carnegie Mellon, Pittsburgh, PA
>>
> In article <MlNbEm_00iWXA1ELQQ@andrew.cmu.edu>, David T Mcwherter
> <dtm+@andrew.cmu.edu> wrote:
>
> No. The only safe use of notifiers is to point them at code that's
> compiled in the native architecture of the endpoint. [The native
> architecture of the endpoint is the ISA of the client that called
> OpenEndpoint.] OT does not CallUniversalProc when calling your notifier,
> it just jumps to it.
>
> If your endpoint needs access to non-native code, you will have install a
> native endpoint that does the MixedModeMagic.
>
Yeah,
But you could just setup a RoutineDescriptor with your code (whatever
architecture) and pass that. If OT just does a jump to the code, then it
will jump to MixedModeMagic inside the upp and everything will be fine.
Right?
<<
Thanks for the help! I would, however, have to say no to giving a UPP
(routine descriptor) instead of a ProcPtr. I believe that would be a
sure way to cause a crash. To my knowledge, UPP's are not executable
code, but just an information block that the Mixed Mode Manager uses to
figure out where the code it should run is and what architecture it's
written in.
-David McWherter
dtm+@andrew.cmu.edu
http://abduction.res.cmu.edu
I want to die peacefully, in my sleep, like my grandfather, not
screaming, terrified, like his passengers.
+++++++++++++++++++++++++++
>From scouten@metrowerks.com (Eric Scouten)
Date: Tue, 09 Apr 1996 19:01:02 -0500
Organization: Metrowerks, Inc.
In article <klOiWm_00iWR0F6ph8@andrew.cmu.edu>, David T Mcwherter
<dtm+@andrew.cmu.edu> wrote:
> But you could just setup a RoutineDescriptor with your code (whatever
> architecture) and pass that. If OT just does a jump to the code, then it
> will jump to MixedModeMagic inside the upp and everything will be fine.
>
> Right?
Wrong. Since OT is written native, it assumes that it can bypass its
internal mixed-mode stuff and calls your notifier proc address directly,
without a call to CallUniversalProc.
The MixedModeMagic trap is a valid 68K instruction, but not a valid
PowerPC instruction.
So...ummm... why would you *want* to write the body of your code in
PowerPC, but the notifier proc in 68K anyway?
-es
__________________________________________________________________________
Eric Scouten Constructor Constructor
scouten@metrowerks.com Metrowerks, Inc.
Buying my car was easy, but this... this is SHOES.
-Saturn advertisement
+++++++++++++++++++++++++++
>From zobkiw@triplesoft.com (Joe Zobkiw)
Date: Tue, 09 Apr 1996 21:39:43 -0400
Organization: TripleSoft Inc.
In article <klOiWm_00iWR0F6ph8@andrew.cmu.edu>, David T Mcwherter
<dtm+@andrew.cmu.edu> wrote:
>>>
>> In article <MlNbEm_00iWXA1ELQQ@andrew.cmu.edu>, David T Mcwherter
>> <dtm+@andrew.cmu.edu> wrote:
>>
>> No. The only safe use of notifiers is to point them at code that's
>> compiled in the native architecture of the endpoint. [The native
>> architecture of the endpoint is the ISA of the client that called
>> OpenEndpoint.] OT does not CallUniversalProc when calling your notifier,
>> it just jumps to it.
>>
>> If your endpoint needs access to non-native code, you will have install a
>> native endpoint that does the MixedModeMagic.
>>
>
>Yeah,
>
>But you could just setup a RoutineDescriptor with your code (whatever
>architecture) and pass that. If OT just does a jump to the code, then it
>will jump to MixedModeMagic inside the upp and everything will be fine.
>
>Right?
>
><<
>
>Thanks for the help! I would, however, have to say no to giving a UPP
>(routine descriptor) instead of a ProcPtr. I believe that would be a
>sure way to cause a crash. To my knowledge, UPP's are not executable
>code, but just an information block that the Mixed Mode Manager uses to
>figure out where the code it should run is and what architecture it's
>written in.
>
Actually, the first word of a RoutineDescriptor is an executable 68k
instruction...that of _MixedModeMagic. When it is called it knows that the
information following it contains the rest of the RoutineDescriptor and
the RoutineRecord(s).
Looked at MixedMode.h for the specific definition.
Joe Zobkiw TripleSoft Inc.
<mailto:zobkiw@triplesoft.com> PO Box 30774 Raleigh NC 27622
<http://www.triplesoft.com/> (919) 872-0916 voice/fax
- - Macintosh Software Development and Internet Publishing ---
Macintosh Programmers -> <http://www.triplesoft.com/fragment/>
---------------------------
>From karm@bga.com (Kevin Armstrong)
Subject: So how does DrawSprocket work?
Date: Fri, 05 Apr 1996 12:36:56 -0600
Organization: Lion Entertainment, Inc.
After downloading the Games Sprocket Docs and SDK, running the examples,
and thinking about things, I've come up with a few questions for the folks
at Apple.
What exactly do you mean by Double Buffering and Page Flipping? What are
the exact details of the implementations on the Mac?
Kevin Armstrong
Lion Entertainment, Inc.
+++++++++++++++++++++++++++
>From kbs3387@silver.sdsmt.edu (Kevin Stone)
Date: 6 Apr 1996 02:04:19 GMT
Organization: South Dakota School of Mines and Technology
: What exactly do you mean by Double Buffering and Page Flipping?
Double buffering and Page flipping are essentialy the same thing.
The idea is that you have two "pages" of memory. While you're
drawing to one of the pages, the other page is being displayed. Then,
when you're done drawing the first page, you can "flip" the pages so
the page that was currently being drawn in is now being displayed, and
the page that was being displayed will now be the page that will be drawn
in.
Because it only takes one pointer move to "flip" pages... Page flipping
is simply the FASTEST way to produce animation. This is
one of the main reasons why PC's have so many superior games.
: What are the exact details of the implementations on the Mac?
That, I cannot help you with. I'm still trying to download the
Game Sprockets SDK from Apples development site. :(
Sincerly,
BAS
+++++++++++++++++++++++++++
>From karm@bga.com (Kevin Armstrong)
Date: Sat, 06 Apr 1996 01:31:21 -0600
Organization: Lion Entertainment, Inc.
In article <4k4jf3$gho@news.sdsmt.edu>, kbs3387@silver.sdsmt.edu (Kevin
Stone) wrote:
>: What exactly do you mean by Double Buffering and Page Flipping?
>
> Double buffering and Page flipping are essentialy the same thing.
> The idea is that you have two "pages" of memory. While you're
> drawing to one of the pages, the other page is being displayed. Then,
> when you're done drawing the first page, you can "flip" the pages so
> the page that was currently being drawn in is now being displayed, and
> the page that was being displayed will now be the page that will be drawn
> in.
>
> Because it only takes one pointer move to "flip" pages... Page flipping
> is simply the FASTEST way to produce animation. This is
> one of the main reasons why PC's have so many superior games.
Okay, your explanation is what I was thinking they were. Now, if they are
essentially the same thing, why do you need both? What is the difference
between the two? Or are we caught up in the use of two terms for the same
thing? Does double buffering mean that the video system has support for
using its ram as your buffers? If that is what double buffering means, is
page flipping just setting a pointer to any place in memory? I suppose
all this ties into the exact implementation question.
Why am I so concerned? Well from what I can see, Double Buffering could
be really slow. If you are trying to write to video ram, you could get
some major slowdowns because video ram can't be cached. So if you are
applying a translucency to a piece of video memory, you have to read from
video memory and write to it which is going to be really slow.
There are problems with Page Flipping as well. If you just point to two
buffers in memory, how does having a video card out on NuBus or PCI bus
affect performance?
I wish the documentation had been more clear on the subject.
Kevin Armstrong
Lion Entertainment, Inc.
+++++++++++++++++++++++++++
>From chriss@abs.net (Chris Sollitto)
Date: Sat, 06 Apr 1996 11:06:33 -0500
Organization: Capital Area Internet Service, Inc.
In article <karm-0604960131210001@news3.realtime.net>, karm@bga.com (Kevin
Armstrong) wrote:
> In article <4k4jf3$gho@news.sdsmt.edu>, kbs3387@silver.sdsmt.edu (Kevin
> Stone) wrote:
>
> >: What exactly do you mean by Double Buffering and Page Flipping?
> >
> > Double buffering and Page flipping are essentialy the same thing.
> > The idea is that you have two "pages" of memory. While you're
> > drawing to one of the pages, the other page is being displayed. Then,
> > when you're done drawing the first page, you can "flip" the pages so
> > the page that was currently being drawn in is now being displayed, and
> > the page that was being displayed will now be the page that will be drawn
> > in.
> >
> > Because it only takes one pointer move to "flip" pages... Page flipping
> > is simply the FASTEST way to produce animation. This is
> > one of the main reasons why PC's have so many superior games.
>
> Okay, your explanation is what I was thinking they were. Now, if they are
> essentially the same thing, why do you need both? What is the difference
> between the two? Or are we caught up in the use of two terms for the same
> thing? Does double buffering mean that the video system has support for
> using its ram as your buffers? If that is what double buffering means, is
> page flipping just setting a pointer to any place in memory? I suppose
> all this ties into the exact implementation question.
>
> Why am I so concerned? Well from what I can see, Double Buffering could
> be really slow. If you are trying to write to video ram, you could get
> some major slowdowns because video ram can't be cached. So if you are
> applying a translucency to a piece of video memory, you have to read from
> video memory and write to it which is going to be really slow.
>
> There are problems with Page Flipping as well. If you just point to two
> buffers in memory, how does having a video card out on NuBus or PCI bus
> affect performance?
>
> I wish the documentation had been more clear on the subject.
>
> Kevin Armstrong
> Lion Entertainment, Inc.
In Apple's implementation, Double Buffering is only a software emulation
of hardware page-flipping which is used on computers which don't have
hardware support for page flipping. In the current release (DR1), the
release notes say that Double Buffering simply calls CopyBits() to do the
swap, but in the future it will use a highly optimized blitter.
--
Chris
+++++++++++++++++++++++++++
>From karm@bga.com (Kevin Armstrong)
Date: Sat, 06 Apr 1996 16:23:31 -0600
Organization: Lion Entertainment, Inc.
In article <chriss-0604961106330001@pm2-s042.abs.net>, chriss@abs.net
(Chris Sollitto) wrote:
>In Apple's implementation, Double Buffering is only a software emulation
>of hardware page-flipping which is used on computers which don't have
>hardware support for page flipping. In the current release (DR1), the
>release notes say that Double Buffering simply calls CopyBits() to do the
>swap, but in the future it will use a highly optimized blitter.
>
>--
>Chris
Thanks Chris, that explains a lot of things. I've been so busy trying to
download this stuff and work on other things that I missed some of the
details as I rushed through the documentation. One question, why does
Apple's documentation say that some machines don't have support for
hardware double buffering? Why would you need it if you had page
flipping? Or did I read that wrong as well? Maybe I'll go and take
another look at the documentation now. =)
Kevin Armstrong
Lion Entertainment, Inc.
+++++++++++++++++++++++++++
>From brianm@caledonia.polaristel.net (Brian P. McCarty)
Date: Sat, 06 Apr 1996 20:13:34 -0600
Organization: totally disorganized
In article <karm-0504961236560001@news3.realtime.net>, karm@bga.com (Kevin
Armstrong) wrote:
> After downloading the Games Sprocket Docs and SDK, running the examples,
> and thinking about things, I've come up with a few questions for the folks
> at Apple.
>
> What exactly do you mean by Double Buffering and Page Flipping? What are
> the exact details of the implementations on the Mac?
I don't know, but it was posted earlier that the "official" address for
questions, feedback, etc is sprockets@adr.apple.com.
>
> Kevin Armstrong
> Lion Entertainment, Inc.
--
Brian P. McCarty, N9IWP
e-mail:brianm@caledonia.polaristel.net
snail-mail:410 S. Ramsey, Apt. 4 Caledonia, MN 55921-1116
ICBM:43deg 38' 05" N 91deg 29' 48" W
+++++++++++++++++++++++++++
>From albtrssp@crocker.com (Kevin Tieskoetter)
Date: 7 Apr 1996 02:02:59 GMT
Organization: Albatross Productions
In article <karm-0604960131210001@news3.realtime.net>
karm@bga.com (Kevin Armstrong) writes:
> Okay, your explanation is what I was thinking they were. Now, if they are
> essentially the same thing, why do you need both? What is the difference
> between the two? Or are we caught up in the use of two terms for the same
> thing? Does double buffering mean that the video system has support for
> using its ram as your buffers? If that is what double buffering means, is
> page flipping just setting a pointer to any place in memory? I suppose
> all this ties into the exact implementation question.
By the way I understand the terms, double buffering and page flipping
are not the same thing. Page flipping is a form of double buffering,
but double buffering can be implemented in one of several different
ways - you can write to two separate memory locations and toggle a
pointer between the two, which requires hardware support (called page
flipping), or you can write your pixel data to some block of memory,
then copy it to the video memory once you've finished a frame (I don't
know if there's a specific technical term for this).
> Why am I so concerned? Well from what I can see, Double Buffering could
> be really slow. If you are trying to write to video ram, you could get
> some major slowdowns because video ram can't be cached. So if you are
> applying a translucency to a piece of video memory, you have to read from
> video memory and write to it which is going to be really slow.
I would imagine that if you are doing operations that require several
reads/writes to the video ram, you wouldn't use page flipping. At some
point, the speeds of the two methods would probably cross.
Now that I think about it, why couldn't page-flipping VRAM be cached?
If you're writing to the section that is not being displayed, you
wouldn't have the problem of chunky updates to the screen. Then, when
you toggle the pointer, the cache gets flushed to VRAM. Wouldn't this
work? Does anyone know how VGA handles this?
-kevin
--
Kevin Tieskoetter
Software Prestidigitator, Specular Int'l
(http://www.specular.com)
Author, _The Black Art of Macintosh Game Programming_ from Waite
Group Press (http://www.waite.com/waite)
+++++++++++++++++++++++++++
>From kbs3387@silver.sdsmt.edu (Kevin Stone)
Date: 7 Apr 1996 18:33:55 GMT
Organization: South Dakota School of Mines and Technology
[deleted]
: details as I rushed through the documentation. One question, why does
: Apple's documentation say that some machines don't have support for
: hardware double buffering?
Because it would be pointless thing to have in hardware. Double
buffering is a software emulation of page flipping. It's actualy no
different then using an offscreen pixmap and blitting it to the
screen's pixmap using CopyBits(). Infact... Apple said that the
current version of Draw Sprocket uses CopyBits() with Double Buffering.
: Why would you need it if you had page flipping?
You woudln't. Page flipping is definitly the way to go if your
video card supports it.
BAS
+++++++++++++++++++++++++++
>From kant0031@itlabs.umn.edu (Krishna Kant)
Date: Mon, 08 Apr 1996 08:18:44 -0600
Organization: U. of MN
In article <chriss-0604961106330001@pm2-s042.abs.net>, chriss@abs.net
(Chris Sollitto) wrote:
> In Apple's implementation, Double Buffering is only a software emulation
> of hardware page-flipping which is used on computers which don't have
> hardware support for page flipping. In the current release (DR1), the
> release notes say that Double Buffering simply calls CopyBits() to do the
> swap, but in the future it will use a highly optimized blitter.
Here are some quotes from the DrawSprocket docs:
"DrawSprocket provides safe ways of managing the display and manipulating
graphics, replacing the dangerous, word-of-mouth, or undocumented methods
currently in use. It provides a consistent user experience for configuring
game play. It also makes page flipping — long a capability of Apple
hardware — accessible to the game."
"SwapDisplayBuffers
Currently calls CopyBits immediately in software double buffering. In
hardware page flipping it only flips the pages. This call will be highly
optimized in future releases.
NOTE: for best performance, always setup your back buffer with the same
bit depth as the front buffer and Draw Sprocket will optimize transfers in
future releases. When the buffers are different bit depths then CopyBits
will be used."
"Double Buffering and Page Flipping
The PowerPC 7500 and 8500 video drivers have support for page flipping in
8 bit depth modes only. Page flipping will not work in other bit depths."
Several months ago, Dale Adams from Apple gave us some information
regarding the double-buffering/page-flipping hardware on all powermacs,
and I will paraphrase (please correct me if I am misquoting):
"The new PCI macs have hardware blitters. In fact, all the powermacs from
day one have had hardware blitters, but they have not been used
extensively."
Given the above (possibly incomplete) information, I arrive at the
following conclusions:
1) _All_ powermacs have specific _hardware_ blitting acceleration built-in
(i.e. outside of the CPU). This blitter is able to accelerate blitting
between DRAM->DRAM, as well as DRAM->VRAM. I will call this "Hardware
Blitting".
2) _Some_ Powermacs, as well as the quadra 630 series, have support for a
separate buffer in VRAM. I will call this "Page Flipping"
2) CopyBits() uses neither Hardware Blitting nor Page Flipping, under any
circumstances--it uses the CPU to do software blits.
3) Neither Hardware Blitting nor Page Flipping (as defined above) have
been documented well, before the release of the sprockets (or even after
the release of the sprockets, I guess).
4) DrawSprocket currently uses Page Flipping, but not Hardware Blitting.
Instead of Hardware Blitting, it uses copybits. Eventually, the sprocket
will support Hardware Blitting for _all_ powermacs.
Are the above four statements correct? If so, can someone from Apple or
somewhere else tell us where to find out more about "Hardware Blitting"?
In article <karm-0604960131210001@news3.realtime.net>, karm@bga.com (Kevin
Armstrong) wrote:
> > Why am I so concerned? Well from what I can see, Double Buffering could
> > be really slow. If you are trying to write to video ram, you could get
> > some major slowdowns because video ram can't be cached. So if you are
> > applying a translucency to a piece of video memory, you have to read from
> > video memory and write to it which is going to be really slow.
Isn't this how double buffering is implemented on the PC? Do PC
programmers have to deal with these same problems as well, and if not,
why?
> > There are problems with Page Flipping as well. If you just point to two
> > buffers in memory, how does having a video card out on NuBus or PCI bus
> > affect performance?
> >
I don't claim to be an expert or anything, but it seems very unlikely to
me that anybody has made a card where you can simply point anywhere in
memory and have it display.
--
Krishna
kant0031@itlabs.umn.edu
+++++++++++++++++++++++++++
>From abrownswor@ea.com (Andrew Brownsword)
Date: Mon, 08 Apr 1996 10:36:13 -0700
Organization: Electronic Arts (Canada), Inc.
In article <kant0031-0804960818440001@dialup-5-125.gw.umn.edu>,
kant0031@itlabs.umn.edu (Krishna Kant) wrote:
>
>1) _All_ powermacs have specific _hardware_ blitting acceleration built-in
>(i.e. outside of the CPU). This blitter is able to accelerate blitting
>between DRAM->DRAM, as well as DRAM->VRAM. I will call this "Hardware
>Blitting".
>
This is the first time I've heard this -- I would hazard a guess that the
hardware blitter is the DMA engine in the PowerMacs. I know that all
NuBus and PCI PowerMacs have a pretty powerful and flexible DMA engine.
The obvious advantage of using this to do the double buffer swap would be
that it runs asyncronously to the CPU. I don't think it would be much
faster since most PowerPCs can saturate their memory bandwidth during such
an operation.
>2) _Some_ Powermacs, as well as the quadra 630 series, have support for a
>separate buffer in VRAM. I will call this "Page Flipping"
We commonly use the term "page flipping" to mean "changing the video
subsystem's base address". We use "double buffering" to imply a memory
transfer from the hidden buffer to the visible buffer. From reading the
Sprocket docs I get the impression that Apple guys are using the same
terminology. Hardware double buffering would then be a memory transfer
using something other than the CPU.
Some video cards might not let you change the base address of the visible
buffer. If such a card had a blitter, it could implement hardware double
buffering by using the blitter to copy the buffers instead of the
motherboard's DMA engine. This would give better performance than a
software DRAM->VRAM copy, assuming you don't need to read too much from
the card's VRAM using the CPU. I don't know if such hardware exists, but
most current video drivers don't support more than 1 video page.
>4) DrawSprocket currently uses Page Flipping, but not Hardware Blitting.
>Instead of Hardware Blitting, it uses copybits. Eventually, the sprocket
>will support Hardware Blitting for _all_ powermacs.
>
The Sprockets doc says that hardware double buffering is rare. Which is
strange in the light of your statement #1 and my definition #2. So
something's gotta be a little off. Hopefully the Sprocket docs.
>Isn't this how double buffering is implemented on the PC? Do PC
>programmers have to deal with these same problems as well, and if not,
>why?
>
>> > There are problems with Page Flipping as well. If you just point to two
>> > buffers in memory, how does having a video card out on NuBus or PCI bus
>> > affect performance?
>> >
>
>I don't claim to be an expert or anything, but it seems very unlikely to
>me that anybody has made a card where you can simply point anywhere in
>memory and have it display.
>
I think VGA/SVGA devices are pretty flexible about where you can point the
base address, although they tend to have some pretty weird behaviour due
to the PC architecture (bank switching being a truly evil such behaviour).
One important difference between the Pentium and PowerPC is (correct me if
I'm wrong) that the Pentium does not cache on write. This makes the
PowerPC's performance to DRAM better, exaggerating the slowness of VRAM
even further (since VRAM is non-cacheable).
As for whether double buffering or pageflipping is better... this has been
discussed in this group at length. The conclusion (I think) is far from
clearcut -- pageflipping isn't some pancea that will dramatically improve
your framerate, but it will eliminate tearing. If your rendering routines
don't suffer from non-cached VRAM and very poor read performance then
pageflipping will give you a big win. If you touch pixels multiple times,
or if you read from the frame buffer then double buffering can actually be
faster than pageflipping. If pageflipping is available, however, you may
want to use it IN ADDITION to double buffering to avoid tearing.
I have yet to see a page flipping system that marks the hidden buffer(s)
as cacheable until they are made visible. This would seem to be
worthwhile on systems with large caches, especially for the PowerPC.
Flushing the cache would then be required before pageflipping, but the
flush operation would use the bus' burst mode.
--
Andrew Brownsword
Software Engineer
Electronic Arts (Canada), Inc.
- ----------------------------
"The opinions expressed in this message are my own and don't necessarily reflect those of my employer."
+++++++++++++++++++++++++++
>From farrier@apple.com (Cary Farrier)
Date: Mon, 08 Apr 1996 11:44:43 -0800
Organization: Apple Computer, Inc.
In article <karm-0604961623310001@news3.realtime.net>, karm@bga.com (Kevin
Armstrong) wrote:
> One question, why does
> Apple's documentation say that some machines don't have support for
> hardware double buffering? Why would you need it if you had page
> flipping? Or did I read that wrong as well? Maybe I'll go and take
> another look at the documentation now. =)
>
> Kevin Armstrong
> Lion Entertainment, Inc.
First let me clarify a few terms so we can all make sure we are
talking about the same things :-).
Page Flipping. When your video subsystem can display alternatate "pages"
of VRAM as the current video page. To "page flip" means to tell the
video system to show a different video page, and is very fast because it
involves only a driver call to show an entirely different page of video data.
Double Buffering. When your video subsystem CAN'T display alternate pages
of VRAM as the current video page. When a system can't page flip, the only
alternative is to render into an offscreen buffer and then copy it to the
screen as fast as possible, hopefully following the video beam so you
don't get tearing artifacts. Depending on the display resolution, you may
be copying a few hundred kbytes or perhaps a megabyte or more of data.
Not all of our video systems have the ability to page flip. Some machines
have the ability but don't bring it out to the system. Currently the 7500
and 8500 machines can, but you have to know the magic handshake to get
them to do it for you. That's where DrawSprocket comes in.
You're right in that read-modify-writes to VRAM can be very slow. If you
find that your game has too low of a pain threshold for this then you can
always force DrawSprocket to double buffer instead of page flip.
In any event, whether you are page flipping or double buffering will be
transparent to your rendering engine when the DR3/DR4 release rolls out in
a few
weeks; I will have some very cool things in by then. You'll still be able to
tell DS to not page flip if you want to, though.
-> Cary
--
- -------------------------------------------------------------------
Cary Farrier
Software Engineer, Apple Game Technology Group
farrier@apple.com
+++++++++++++++++++++++++++
>From zzkbergm@dingo.uq.edu.au (Christoph Bergmann)
Date: Tue, 09 Apr 1996 09:21:22 +1000
Organization: University of Queensland
> >1) _All_ powermacs have specific _hardware_ blitting acceleration built-in
> >(i.e. outside of the CPU). This blitter is able to accelerate blitting
> >between DRAM->DRAM, as well as DRAM->VRAM. I will call this "Hardware
> >Blitting".
let's pray. maybe apple will tell us how? :)
> I have yet to see a page flipping system that marks the hidden buffer(s)
> as cacheable until they are made visible. This would seem to be
> worthwhile on systems with large caches, especially for the PowerPC.
> Flushing the cache would then be required before pageflipping, but the
> flush operation would use the bus' burst mode.
can powermac software even do this? i know the system software controls
most of the cache settings. can this be safely overridden? (if so, can we
even do it for the _visible_ page, write cached, and flush the cache at
the end? is this faster than double-writes?)
chris
+++++++++++++++++++++++++++
>From nctrost@interaccess.com (Nathaniel C. Trost)
Date: Tue, 09 Apr 1996 06:40:33 -0600
Organization: InterAccess Co.
In article <farrier-0804961144430001@a17-201-33-79.apple.com>,
farrier@apple.com (Cary Farrier) wrote:
> Not all of our video systems have the ability to page flip. Some machines
> have the ability but don't bring it out to the system. Currently the 7500
> and 8500 machines can, but you have to know the magic handshake to get
> them to do it for you. That's where DrawSprocket comes in.
What about the 5200/6200/6300? I have been tearing my hair out for a
while on these since I know _how_ the Valkyrie works, I just don't know
where the control registers are!
For anyone who is curious, the Valkryie is described in the technical
notes for the Quadra 630, Performa 5200/6200/6300/etc. Basically, its
ability to page-flip comes from its support for video-in from the capture
card or the TV tuner. The meg of DRAM is divided into three buffers: the
main display buffer and a pair of 320x240x16b buffers used for video
display. One of the video buffers is the display buffer and the other is
the draw buffer. The position, width and height of the display buffer
(displayed on top of the main display buffer) can be changed. I just
haven't been able to find any reference to where all the registers are and
haven't had time to poke around in anything that uses it (or, THE thing
that uses it <grin>).
Is the 7500/8500 page flip similar to the Valkryie only with higher
resolution in the video buffers? I haven't read over the hardware notes
for those machines.....
> You're right in that read-modify-writes to VRAM can be very slow. If you
> find that your game has too low of a pain threshold for this then you can
> always force DrawSprocket to double buffer instead of page flip.
Will it also support double buffing with page flipping? <grin> What I
mean is, even when lots of read-modify-writes to the pixel buffer are
required, page flipping would still be nice for tear reduction. Would the
Draw Sprocket support having a main memory pixel buffer for primary
rendering with a command to blit the offscreen buffer to the hardware page
NOT being displayed and THEN switch the pages? I too need to sit down and
really read the documentation...
--
Nate Trost
+++++++++++++++++++++++++++
>From farrier@apple.com (Cary Farrier)
Date: Tue, 09 Apr 1996 06:38:30 -0700
Organization: Apple Computer, Inc.
In article <nctrost-0904960640330001@d148.w.interaccess.com>,
nctrost@interaccess.com (Nathaniel C. Trost) wrote:
> What about the 5200/6200/6300? I have been tearing my hair out for a
> while on these since I know _how_ the Valkyrie works, I just don't know
> where the control registers are!
The Valkyrie has some very cool modes, and the Valkyrie AR has even better
things such as linear interpoloation during pixel doubling.
I would like to bring these modes out and make them available from Draw
Sprocket, the exact details of how I will do this are not decided on yet.
It will probably be in the form of private driver calls between DS and
the video driver.
> Is the 7500/8500 page flip similar to the Valkryie only with higher
> resolution in the video buffers? I haven't read over the hardware notes
> for those machines.....
No, the Valkyrie page flipping is an odd entity. The Valkyrie uses the two
video input buffers as pages, as you know already. This means that they
are separate from the graphics plane and can be intermixed, which is how
you get the little TV video window on your desktop. You can't have graphic
overlays with the 7500/8500 page flipping, since they are already graphic
pages.
> Will it also support double buffing with page flipping? <grin> What I
Yes, you can create an offscreen buffer through DS and bring it to the
back page before flipping, using one of my fast blitters.
> I too need to sit down and really read the documentation...
There are a lot of changes that didn't make it into the old docs, and a number
of new calls too. I also am adding new things as people bring them to my
attention. Don't take the existing docs as the last word, in other words.
-> Cary
--
--
- -------------------------------------------------------------------
Cary Farrier
Software Engineer, Apple Game Technology Group
farrier@apple.com
+++++++++++++++++++++++++++
>From kant0031@itlabs.umn.edu (Krishna Kant)
Date: Tue, 09 Apr 1996 22:21:28 -0600
Organization: U. of MN
In article <farrier-0904960638300001@farrier.vip.best.com>,
farrier@apple.com (Cary Farrier) wrote:
> Yes, you can create an offscreen buffer through DS and bring it to the
> back page before flipping, using one of my fast blitters.
Is this blitting done in software (like a fast version of CopyBits), or
does DS access "special hardware" on Powermacs (outside the CPU) which
does the blitting?
--
Krishna
kant0031@itlabs.umn.edu
+++++++++++++++++++++++++++
>From farrier@apple.com (Cary Farrier)
Date: Wed, 10 Apr 1996 09:33:53 -0700
Organization: Apple Computer, Inc.
In article <316BB589.41C67EA6@ls11.informatik.uni-dortmund.de>, Frank
Hoffmann <hoffmann@ls11.informatik.uni-dortmund.de> wrote:
>Could you explain the 7500/8500 page flipping a little bit more in detail?
>Is it a real Page Flipping or only hardware support for DMA copy?
It is real page flipping.
>Is there a limitation at which adresses a page could start?
Yes, they are fixed at 2Mb offsets from the base address of the VRAM, and
only two pages are allowed. This means that you must have 4Mb of VRAM
for the page flipping to work on the 7500/8500.
>I have read that the 7500/8500 could copy a bitmap with a one bit bitmask
>to a gfxpage without useing the processor, useing DMA. Is this true?
You're probably thinking of DBDMA. DBDMA is a DMA system that exists in
all of the PCI PowerPC machines. It doesn't have limitations on the data
being passed in that respect, so the bitmask you are referring to must be
either a function of the video hardware or something someone thought of
as a way to manipulate the video hw, if the capability exists at all.
>Are you planning to support that in future DS versions?
On the machines that do have a DBDMA controller, I will be taking
advantage of them (the 7200 is one machine that I am positive has one,
the other machines, including the 7500/8500, I am not sure of).
>I do not know about speed and bus usage of this
>feature, but under certain conditions that could be much faster
The biggest gain that I see will be that DBDMA would offload a large
percentage of the transfer work to the dma system, freeing up the
CPU.
>What about the 6100/7100/8100 DRAM,VRAM and AV Gfx. Does they support page
>flipping in Hardware?
When we revise the drivers for each machine, any capabilities will
be brought out. I don't have the specs for those machines in front of
me so I can't say for certain.
>Does I understand it right, that the machines with the Valkyrie chip does
>not support page flipping and double buffering in Hardware with resolutions
>higher than 320*240 pixels?
AFAIK. When the drivers are revved and the capabilities brought out,
I will know for sure.
-> Cary
--
- -------------------------------------------------------------------
Cary Farrier
Software Engineer, Apple Game Technology Group
farrier@apple.com
+++++++++++++++++++++++++++
>From farrier@apple.com (Cary Farrier)
Date: Wed, 10 Apr 1996 09:35:37 -0700
Organization: Apple Computer, Inc.
In article <kant0031-0904962221280001@dialup-4-63.gw.umn.edu>,
kant0031@itlabs.umn.edu (Krishna Kant) wrote:
> Is this blitting done in software (like a fast version of CopyBits), or
> does DS access "special hardware" on Powermacs (outside the CPU) which
> does the blitting?
Yes, and yes -- It depends on the capabilities of the machine the software
is running on.
-> Cary
--
- -------------------------------------------------------------------
Cary Farrier
Software Engineer, Apple Game Technology Group
farrier@apple.com
+++++++++++++++++++++++++++
>From Frank Hoffmann <hoffmann@ls11.informatik.uni-dortmund.de>
Date: Wed, 10 Apr 1996 15:20:10 +0200
Organization: CS Department, University of Dortmund, Germany
Cary Farrier wrote:
> > Is the 7500/8500 page flip similar to the Valkryie only with higher
> > resolution in the video buffers? I haven't read over the hardware notes
> > for those machines.....
>
> No, the Valkyrie page flipping is an odd entity. The Valkyrie uses the two
> video input buffers as pages, as you know already. This means that they
> are separate from the graphics plane and can be intermixed, which is how
> you get the little TV video window on your desktop. You can't have graphic
> overlays with the 7500/8500 page flipping, since they are already graphic
> pages.
Could you explain the 7500/8500 page flipping a little bit more in detail? Is it a
real Page Flipping or only hardware support for DMA copy?
Is there a limitation at which adresses a page could start?
I have read that the 7500/8500 could copy a bitmap with a one bit bitmask to a gfxpage
without useing the processor, useing DMA. Is this true? Are you planning to support that
in future DS versions? I do not know about speed and bus usage of this feature, but under
certain conditions that could be much faster (because the VRAM is not cachable) and
other programing methods (one we have just implemented in out upcomeing game).
What about the 6100/7100/8100 DRAM,VRAM and AV Gfx. Does they support page flipping in
Hardware?
Does I understand it right, that the machines with the Valkyrie chip does not support
page flipping and double buffering in Hardware with resolutions higher than 320*240 pixels?
--
Frank Hoffmann voice: (Germany)-2103-44690
Hochdahler Str.134
40724 Hilden, Germany
Internet e-mail: hoffmann@ls11.informatik.uni-dortmund.de
---------------------------
>From bill@clavin.lmsc.lockheed.com (Bill Catambay)
Subject: TCL Page needs feedback.
Date: Wed, 03 Apr 1996 09:09:25 -0800
Organization: Enterprise Information Systems
The latest article posted to Pascal Central is "TCL Pascal LIVES!!!", a
collection of TCL source code tidbits for Pascal TCL programmers. Check
out the page, and _please_ provide feedback, either in terms of what you
want but cannot find there, or what you may have to contribute to it (such
as CW TCL support information, TCL samples, etc.). Thanks!
Pascal Central web site:
http://www.webcom.com/icog/polymorphic/pascal.html
Pascal Central is a collection of Pascal-related content all in one
location to make it easier for the many Pascal developers out there to
cope in a world dominated by C and C++.
If you have any pascal-related articles, documented source code or book
reviews you think would be of benefit to the Pascal community, let me
know. Pascal Central is now going through adolescence, and I'm always
looking to the Pascal community to help mature its content.
Cheers,
Bill
_____________________________________________________________________
Bill Catambay
Pascal Programmer on Macintosh and Open VMS
/>
// The purpose of software engineering
(//////[O]>=========================================-
\\ is to manage complexity, not to create it.
\>
____________________________________________________________________
---------------------------
>From pawliger@mv.us.adobe.com (Marc Pawliger)
Subject: What are little GURLs made of?
Date: 8 Apr 1996 18:05:13 GMT
Organization: Adobe Systems, Mt. View, CA
Sugar and spice and AEParamFlags?
I need to know the simplest and proper way to send out GURL events from an
app. I want to be able to tell from the app:
- If IC is installed, just use ICLaunchURL I have the IC SDK and source.
I'd rather not use the IC static lib but just gestalt whether IC is
installed before calling through to it.
- Otherwise send the AE myself to a browser IFF one is running. This is
the ugly part since I can't assume IC is there.
- Otherwise do something else.
TIA.
--marc
--
+ Marc Pawliger pawliger@adobe.com 415.962.4918 +
| |
| Adobe Systems Photoshop Wiseguy(tm) Mt. View, CA |
+ Current Peeve: prematurely failed fusible links in a 1992 240SX +
+++++++++++++++++++++++++++
>From isis@isis-intl.com (Mike Cohen)
Date: Wed, 10 Apr 1996 10:52:23 -0600
Organization: ISIS International
In article <4kbkgp$5a7@enquirer.mv.us.adobe.com>,
pawliger@mv.us.adobe.com (Marc Pawliger) wrote:
>
>- Otherwise send the AE myself to a browser IFF one is running. This is
> the ugly part since I can't assume IC is there.
>
There should be a user preference for which browser to use. If the browser
isn't running, launch it either by full pathname or by searching the
Desktop Database on all volumes for the signature.
After it's running, send an AppleEvent of class 'GURL' & ID 'GURL' with the
text of the URL in the direct object.
--
Mike Cohen - isis@isis-intl.com - Home Page: http://www.isis-intl.com/
Sound is the same for all the world - Youssou N'dour, "Eyes Open"
+++++++++++++++++++++++++++
>From jwbaxter@olympus.net (John W. Baxter)
Date: Thu, 11 Apr 1996 17:39:22 -0700
Organization: Internet for the Olympic Peninsula
In article <AD9143679668244BD8@cpr-cap-1.wyoming.com>, isis@isis-intl.com
(Mike Cohen) wrote:
>In article <4kbkgp$5a7@enquirer.mv.us.adobe.com>,
>pawliger@mv.us.adobe.com (Marc Pawliger) wrote:
>
>>
>>- Otherwise send the AE myself to a browser IFF one is running. This is
>> the ugly part since I can't assume IC is there.
>>
>
>There should be a user preference for which browser to use. If the browser
>isn't running, launch it either by full pathname or by searching the
>Desktop Database on all volumes for the signature.
>
>After it's running, send an AppleEvent of class 'GURL' & ID 'GURL' with the
>text of the URL in the direct object.
And if Internet Config is available, use the brower preference set there
rather than making your user deal with setting your preference the same
way she set Internet Config 2 months ago in hopes of not having to deal
with this stuff in every program.
--John
--
The primary cause of problems is solutions.
John W. Baxter Port Ludlow, WA, USA jwbaxter@olympus.net
---------------------------
>From 73045.734@compuserve.com (Robert E Otto)
Subject: Windows vs Dialogs
Date: Sat, 30 Mar 1996 03:53:27 -0600
Organization: REO Associates
I have been into Mac programming for eight weeks now and ready to
do some serious development. Here is what I am trying to do...
I want to create an instrument panel. The panel will have sliders, strip
charts, buttons, etc. It will *not* contain any text or numbers. No need
for scroll bars but I do want the panel to grow and zoom. Also I want to
create multiple copies of the panel.
A modeless dialog box would seem to nicely handle the various fields in
the panel but it looks like I am violating something with the grow and
zoom capability. From the Human Interface Guidlines they seem to be
restricted to windows.
On the other hand, windows seem to be for documents and I don't have any text!
Which way to go?
I really need help in understanding the issues involved. Any advice appreciated.
--
Bob Otto
St Louis
38.612 N 90.482 W
+++++++++++++++++++++++++++
>From meir@zoology.washington.edu (Eli Meir)
Date: 31 Mar 1996 20:17:07 GMT
Organization: Dept. of Zoology, Univ. of Washington
I don't know the interface guidelines that well, but judging from other
products and my own stuff, there's absolutely no requirement that a
window have text in it. I would guess the distinction between a window
and a modeless dialog box (in interface terms) is something like a
window should have some data in it, wheras a dialog box is just asking
for information from the user. Since you have strip charts, that
sounds like information in a window.
In any case, a modeless dialog box is basically just a window without
certain bits like scroll bars and a grow box, so I wouldn't worry about
semantics too much and just use whatever works.
Hope that helps.
Eli Meir
Dept of Zoology, Univ of Washington
meir@zoology.washington.edu
+++++++++++++++++++++++++++
>From gurgle@apple.com (Pete Gontier)
Date: Tue, 02 Apr 1996 12:59:35 -0800
Organization: Apple Computer, Inc.
In article <4jmp83$1qd@nntp5.u.washington.edu>,
meir@zoology.washington.edu (Eli Meir) wrote:
> ...there's absolutely no requirement that a window have text in it.
True so far.
> I would guess the distinction between a window
> and a modeless dialog box (in interface terms) is something like a
> window should have some data in it, wheras a dialog box is just asking
> for information from the user.
A dialog *is* a window. The technical difference is that the contents of a
dialog are managed by Dialog Manager. The human interface difference
should be nothing.
A *modal* dialog should block access to everything but itself. A
*moveable-modal* dialog should block access to everything in the host
application -- but allow itself to be dragged, allow switching to other
apps, etc.
- -
Pete Gontier, Integer Poet, Apple Macintosh Developer Technical Support
work mail <mailto:gurgle@apple.com>
personal mail <mailto:gurgle@ccnet.com>
personal web <http://www.ccnet.com/~gurgle>
work web <http://dev.info.apple.com/dts.html>
+++++++++++++++++++++++++++
>From deirdre@sover.net (Deirdre)
Date: Sun, 07 Apr 1996 08:23:34 -0500
Organization: Not hardly
In article <gurgle-0204961259350001@gontpe.apple.com>, gurgle@apple.com
(Pete Gontier) wrote:
> A dialog *is* a window. The technical difference is that the contents of a
> dialog are managed by Dialog Manager. The human interface difference
> should be nothing.
Or, more specifically, a dialog has the complete structure of a window
plus added behavior that makes things like adding controls and editing
your stuff in a DITL versus putting it in via code easy.
If you need to do what you're (meaning the original poster) is doing and
you're new to programming, a Dialog is MUCH MUCH easier on you.
It even opens a color window instead of a b&w window if it needs to and can.
> A *modal* dialog should block access to everything but itself. A
> *moveable-modal* dialog should block access to everything in the host
> application -- but allow itself to be dragged, allow switching to other
> apps, etc.
Unless there's a pressing reason to use a modal, use a moveable modal.
For your first programming, you might prefer to use a modal in order to
learn, but I'd say you should make it a moveable modal as soon as you get
the hang of the modal dialog.
_Deirdre
http://wwww.sover.net/~deirdre
---------------------------
>From ykanai@m.u-tokyo.ac.jp (Yoshimitsu Kanai)
Subject: [ANN] Macintosh C
Date: 8 Apr 1996 12:44:00 GMT
Organization: Univ. of Tokyo
Hi Warriors!
I received a good news from Mr.K. J. Bricknell that
Macintosh C, an excellent guide for C programming
in CW and SC is now on WWW.
I believe this will be the most powerful tool for
Mac programming.
The following is his announcement.
**********************************************************************
A NEW RESOURCE FOR MACINTOSH PROGRAMMING ENTHUSIASTS
CANBERRA, Australia -- April 5, 1996 -- The Alt.Sources.Mac archive
is pleased to announce the availability of MACINTOSH C, the first
online Macintosh programming text. The book, targeted towards
beginning or intermediate Macintosh programmers, can be viewed online
using a WWW browser or downloaded via FTP and printed out using MS
Word.
"Macintosh C had its genesis in some detailed notes I compiled as I
taught myself to program the Macintosh in C", said the author. "The
development of those notes into a full-blown manual represents an
attempt on my part to alleviate many of the difficulties faced by
other hobbyists setting out on the same journey."
MACINTOSH C covers all of the material which, in the opinion of the
author, a beginning hobbyist needs to address before writing his or
her first serious application in C. It includes chapters describing
the system software, memory, resources, low-level and operating system
events, menus, windows, controls, dialogs and alerts, the Finder
interface, required Apple events, basic QuickDraw, color QuickDraw,
offscreen graphics worlds, pictures, cursors, icons, printing, files,
scrap, TextEdit and text, lists and LDEFs, custom CDEFs and VBL tasks,
floating windows and custom WDEFs, code segmentation, notifications,
compatibility with the operating environment, coping with multiple
monitors, and porting to the Power Macintosh.
"K. J. needed a home for the book and I was more than happy to provide
one", says Dave Nebinger, the Alt.Sources.Mac archivist. "MACINTOSH C
takes the Alt.Sources.Mac archive to the next level, from a collection
of snippets and source code to an invaluable Mac programming
resource."
MACINTOSH C comprises a book and associated demonstration program
files. The demonstration files come complete with sources, headers,
and projects.
"I remember all to well what it was like learning C on my own" says
Ambrosia Software, Inc.'s Andrew Welch. "I'm excited about hosting the
Macintosh C site, because it is an excellent online resource for
budding Macintosh C programmers."
Two MS Word editions of the book are available:
* The CodeWarrior Edition, for users of the Metrowerks CodeWarrior
development system (also available online via WWW).
* The THINK C Edition, for users of Symantec`s THINK C development
system.
To examine the online version of MACINTOSH C, point your WWW browser
at:
<http://www.AmbrosiaSW.com/alt.sources.mac/>
then follow the MACINTOSH C link...
To download the MS Word editions and demos, you can download them via
the WWW pages or use the following URLs:
For CodeWarrior users:
<ftp://ftp.AmbrosiaSW.com/pub/alt.sources.mac/macintosh-c/codewarrior-
word.sit.hqx>
<ftp://ftp.AmbrosiaSW.com/pub/alt.sources.mac/macintosh-c/codewarrior-
demos.sit.hqx>
For Think C users:
<ftp://ftp.AmbrosiaSW.com/pub/alt.sources.mac/macintosh-c/thinkc-word.
sit.hqx>
<ftp://ftp.AmbrosiaSW.com/pub/alt.sources.mac/macintosh-c/thinkc-demos
sit.hqx>
**********************************************************************
The HTML version is best viewed with a "frames-capable" browser such
as Netscape 2.0.
- ---------------------------------------------------
Yoshimitsu Kanai, MD. PhD.
Department of Anatomy and Cell Biology,
School of Medicine, University of Tokyo,
7-3-1, Hongo, Bunkyo-ku, Tokyo 113 Japan
Tel:81-3-3812-2111 (ext. 3336)
Fax:81-3-5689-4856
e-mail: ykanai@m.u-tokyo.ac.jp
- ---------------------------------------------------
---------------------------
>From schiltz@cs.ucdavis.edu (Michael Schiltz)
Subject: mac INIT loading order
Date: 2 Apr 1996 05:09:42 GMT
Organization: UCDavis Computer Science
how can you control the order in which an INIT loads. I want to have my
INIT load ASAP. any ideas?
Thanks in advance,
mike
schiltz@cs.ucdavis.edu
--
-Through the modem, past the router, over the firewall.. nothing but Net -
+++++++++++++++++++++++++++
>From Patrick.Stadelmann@etudiants.unine.ch (Patrick Stadelmann)
Date: Tue, 02 Apr 1996 15:33:12 +0200
Organization: University of Neuchatel
In article <schiltz-0104962111000001@reqd-010.ucdavis.edu>,
schiltz@cs.ucdavis.edu (Michael Schiltz) wrote:
> how can you control the order in which an INIT loads. I want to have my
> INIT load ASAP. any ideas?
The loading order is alphabetical, so you can try adding spaces in front
of the name. Another possibility is to change the type of your extension
from 'INIT' to 'scri' (these files load before the standard 'INIT' files)
Patrick
--
Patrick Stadelmann <Patrick.Stadelmann@etudiants.unine.ch>
+++++++++++++++++++++++++++
>From 75300.1001@compuserve.com (C.K. Haun)
Date: Wed, 03 Apr 1996 01:05:40 -0700
Organization: Ravenware Software
In article <Patrick.Stadelmann-0204961533120001@mac41imtt.unine.ch>,
Patrick.Stadelmann@etudiants.unine.ch (Patrick Stadelmann) wrote:
> In article <schiltz-0104962111000001@reqd-010.ucdavis.edu>,
> schiltz@cs.ucdavis.edu (Michael Schiltz) wrote:
>
> > how can you control the order in which an INIT loads. I want to have my
> > INIT load ASAP. any ideas?
>
> The loading order is alphabetical, so you can try adding spaces in front
> of the name. Another possibility is to change the type of your extension
> from 'INIT' to 'scri' (these files load before the standard 'INIT' files)
Yikes! Be aware that if you were to do something as foolish as changing
your INIT type to 'scri' then you may not be able to do everything you
want to!
'scri' is not a documented type for 3rd parties to use *because* the
system is not fully functinal at the time that 'scri's load. What exactly
may or may not exist at that time is dependent on the machine and system
version.
If you make no toolbox calls, or stick to things like resource manager
and file manager calls you should be OK, but all bets are off in general
at 'scri' time.
C.K. Haun
Ravenware Software
75300.1001@compuserve.com
The Mild Bunch
1996 Royal Star 1300 1991 Voyager 1200 1990 Virago 750
1993 Virago 535 1987 Reflex 225 <rent this space>
+++++++++++++++++++++++++++
>From zobkiw@triplesoft.com (Joe Zobkiw)
Date: Tue, 02 Apr 1996 17:18:09 -0500
Organization: TripleSoft Inc.
In article <schiltz-0104962111000001@reqd-010.ucdavis.edu>,
schiltz@cs.ucdavis.edu (Michael Schiltz) wrote:
>how can you control the order in which an INIT loads. I want to have my
>INIT load ASAP. any ideas?
Place it in the Extensions folder and name it so it sorts alphabetically
before all other system extensions.
Joe Zobkiw <mailto:zobkiw@triplesoft.com>
TripleSoft Inc. <http://www.triplesoft.com/>
PO Box 30774 Raleigh, NC 27622 (919) 872-0916 voice/fax
- -------------------------------------------------------------
Specializing in Macintosh Software Development & WWW Publishing
- -------------------------------------------------------------
Macintosh Programmers --> <http://www.triplesoft.com/fragment/>
+++++++++++++++++++++++++++
>From jeremyr@dcs.qmw.ac.uk (Jeremy Roussak)
Date: 9 Apr 1996 17:02:58 GMT
Organization: Queen Mary & Westfield College, London, England
In article <schiltz-0104962111000001@reqd-010.ucdavis.edu>
schiltz@cs.ucdavis.edu (Michael Schiltz) writes:
> how can you control the order in which an INIT loads. I want to have my
> INIT load ASAP. any ideas?
Put a null (or two) at the start of the name. INITs load in
alphabetical order. Extensions load first, then control panels, then
items in the System Folder itself (under system 7).
Jeremy
+++++++++++++++++++++++++++
>From zobkiw@triplesoft.com (Joe Zobkiw)
Date: Tue, 09 Apr 1996 21:33:11 -0400
Organization: TripleSoft Inc.
In article <4ke582$rua@epsilon.qmw.ac.uk>, jeremyr@dcs.qmw.ac.uk (Jeremy
Roussak) wrote:
>In article <schiltz-0104962111000001@reqd-010.ucdavis.edu>
>schiltz@cs.ucdavis.edu (Michael Schiltz) writes:
>
>> how can you control the order in which an INIT loads. I want to have my
>> INIT load ASAP. any ideas?
>
>Put a null (or two) at the start of the name. INITs load in
>alphabetical order. Extensions load first, then control panels, then
>items in the System Folder itself (under system 7).
No! I believe there is a problem with AppleShare/Personal File Sharing
with files that contain/start with null characters. I had to change this
behaviour in a control panel I wrote once. Jim Luther (JumpLong@aol.com)
may have a comment on this since I believe he is the one who told me about
it.
Just use spaces. Printable characters are always safe...except periods of
course :)
Joe Zobkiw TripleSoft Inc.
<mailto:zobkiw@triplesoft.com> PO Box 30774 Raleigh NC 27622
<http://www.triplesoft.com/> (919) 872-0916 voice/fax
- - Macintosh Software Development and Internet Publishing ---
Macintosh Programmers -> <http://www.triplesoft.com/fragment/>
+++++++++++++++++++++++++++
>From gurgle@apple.com (Pete Gontier)
Date: Wed, 10 Apr 1996 14:32:42 -0800
Organization: Apple Computer, Inc.
In article <brians-0204960110360001@slip-46-7.ots.utexas.edu>,
brians@pbcomputing.com (Brian Stern) wrote:
> INITs present in script system extension files
> (filetype 'scri') load before ...
...INIT resources in the System file itself, which load before...
> ...INITs present in ... extension files...
- -
Pete Gontier, Integer Poet, Apple Macintosh Developer Technical Support
work mail <mailto:gurgle@apple.com>
personal mail <mailto:gurgle@ccnet.com>
personal web <http://www.ccnet.com/~gurgle>
work web <http://dev.info.apple.com/dts.html>
---------------------------
End of C.S.M.P. Digest
**********************